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

Feature: error reporting with clean stacktraces #18

Open
imsnif opened this issue Jun 17, 2020 · 2 comments
Open

Feature: error reporting with clean stacktraces #18

imsnif opened this issue Jun 17, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@imsnif
Copy link
Owner

imsnif commented Jun 17, 2020

Right now, if the app panics, the stacktrace we see is very much messed up and hard to read, since the terminal is in "raw mode". It would be nice if we could catch all these errors, clear the terminal, exit raw mode and then print them to the screen.

@imsnif imsnif added the help wanted Extra attention is needed label Jun 17, 2020
@bjorn3
Copy link

bjorn3 commented Sep 5, 2020

There is std::panic::set_hook. You could set a hook that exits raw mode and then calls the default hook.

@imsnif
Copy link
Owner Author

imsnif commented Sep 7, 2020

That sounds like a good approach. I think it would be best to use it with the Termion methods of suspending raw mode here: https://github.com/redox-os/termion/blob/189222555ef92a29de366f96d2a067b3a920fc24/src/raw.rs#L118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants