Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging & Exception Fixes #624

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MBBSEmu/CPU/RegistersStructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ public override string ToString()
output.Append($"BX={this.BX:X4} ");
output.Append($"CX={this.CX:X4} ");
output.Append($"DX={this.DX:X4} ");
output.Append($"CS={this.CS:X4} ");
output.Append($"DS={this.DS:X4} ");
output.AppendLine($"ES={this.ES:X4} ");
output.Append($"SI={this.SI:X4} ");
Expand Down
5 changes: 1 addition & 4 deletions MBBSEmu/HostProcess/ExportedModules/Majorbbs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4059,10 +4059,7 @@ private void catastro()

var formattedMessage = FormatPrintf(message, 2);

Console.ForegroundColor = ConsoleColor.Yellow;
Console.BackgroundColor = ConsoleColor.Red;
Console.WriteLine($"{Encoding.ASCII.GetString(formattedMessage)}");
Console.ResetColor();
_logger.Error($"({Module.ModuleIdentifier}) Catastro Failure: {Encoding.ASCII.GetString(formattedMessage)}");

Registers.Halt = true;
}
Expand Down
2 changes: 1 addition & 1 deletion MBBSEmu/HostProcess/MbbsHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ private void DisableModule(string moduleId, bool isCrashed = false)
}

//Notify Users and Exit Modules
foreach (var c in _channelDictionary.Values.Where(x => x.CurrentModule.ModuleIdentifier == moduleId))
foreach (var c in _channelDictionary.Values.Where(x => x.CurrentModule?.ModuleIdentifier == moduleId))
{
if (isCrashed)
{
Expand Down
Loading