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

Add crash handler on Windows, enable crash logging on Mac #86

Merged
merged 6 commits into from
Apr 3, 2023

Conversation

jonko0493
Copy link
Member

Linux: 🤷‍♀️

This adds a simple crash handler on Windows that can catch exceptions prior to a crash and log them to the log file. We add a special LogCrash function to the LoopyLogger so that we don't pop a message box when logging that particular error.

WPF is able to catch these exceptions because they are its native exceptions; however, we're not so lucky on Mac and Linux. The end result here is that we need to be better at exception handling generally. In the meantime though, I've enabled crash logging on Mac which will give stack traces in the standard macOS "Report this error" dialog, so we can tell people to do that to get useful logs on that platform at least.

Fixes #79.

@jonko0493 jonko0493 self-assigned this Apr 3, 2023
Copy link
Member

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this yet but the implementation looks good. Haven't had a chance to see why checks are failing

src/SerialLoops/Utility/LoopyLogger.cs Outdated Show resolved Hide resolved
@jonko0493 jonko0493 merged commit 95839be into haroohie-club:main Apr 3, 2023
@jonko0493 jonko0493 deleted the AddCrashHandler branch April 3, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add crash handler
2 participants