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

Handle simplification panics #30

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Handle simplification panics #30

merged 2 commits into from
Sep 26, 2023

Conversation

newsch
Copy link
Collaborator

@newsch newsch commented Sep 4, 2023

I've tested manually and it:

  • handles panics with a static message or formatted arguments
  • logs an error instead of exiting (backtraces are still printed)
  • writes any panic-causing html to an errors/ subdirectory

Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

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

cargo fmt to pass the check?

@newsch
Copy link
Collaborator Author

newsch commented Sep 26, 2023

Looks like it's from stabilizing the formatting of let-else: https://blog.rust-lang.org/2023/07/01/rustfmt-supports-let-else-statements.html

I've made a separate PR for it: #31
Once that is merged I'll update the other PRs.

The caught html panics still print backtraces. Disabling it in rust
would require changing the global panic handler when entering and
exiting the function.

Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
I've tested manually and it:
- handles panics with a static message or formatted arguments
- logs an error instead of exiting (backtraces are still printed)
- writes any panic-causing html to an `errors/` subdirectory

Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
@newsch newsch merged commit 3317451 into main Sep 26, 2023
@newsch newsch deleted the simplify-panics branch September 26, 2023 19:08
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.

2 participants