-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Unhandled exception handler added - Improvements to HTML generator - Moved Extensions.cs to Backend - Moved interaction handler assignment to MapHandlers()
- Loading branch information
Showing
11 changed files
with
448 additions
and
458 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
using PBot.Commands.Helpers; | ||
using static PBot.Messages.Logging; | ||
|
||
if (!PHelper.EnableVirtualAndHideCursor()) throw new OperationCanceledException("VT_Sequences (phlpr.dll) failed to initlialize the console."); | ||
|
||
AppDomain current = AppDomain.CurrentDomain; // Load handler after phlpr.dll to prevent infinite loop. | ||
current.UnhandledException += async (object sender, UnhandledExceptionEventArgs e) => | ||
{ | ||
Console.Clear(); | ||
WriteAsID($"An unhandled '{e.ExceptionObject.GetType()}' occured at {DateTime.Now.ToLongTimeString()} on {DateTime.Now.ToLongDateString()}", SpecialId.Network); | ||
await Restart(); | ||
}; | ||
|
||
if (!PHelper.EnableVirtualAndHideCursor()) throw new OperationCanceledException("VT_Sequences (VTs.dll) failed to initlialize the console."); | ||
Console.OutputEncoding = System.Text.Encoding.Unicode; | ||
|
||
Start(); | ||
StartInteractionHandler(); | ||
|
||
ProbabilityStateMachine.InitXShift128(); | ||
|
||
await Task.Delay(Timeout.Infinite); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.