Skip to content

pretty print panics #854

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

Merged

Conversation

andreeaflorescu
Copy link
Member

Issue #, if available: #837

Description of changes:
Instead of printing the PanicInfo using debug, we can use display
as this generates a human readable panic.

Before:
Panic occurred: PanicInfo { payload: Any, message: Some(Failed to
open the API socket: IO Error: Io(Os ...

After:
Firecracker panicked at 'Failed to open the API socket: IO Error:
...

This is the first step in having human readable panics. Next we
should implement Display for errors that can generate panics.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Instead of printing the PanicInfo using debug, we can use display
as this generates a human readable panic.

Before:
Panic occurred: PanicInfo { payload: Any, message: Some(Failed to
open the API socket: IO Error: Io(Os ...

After:
Firecracker panicked at 'Failed to open the API socket: IO Error:
...

This is the first step in having human readable panics. Next we
should implement Display for errors that can generate panics.

Signed-off-by: Andreea Florescu <[email protected]>
@alxiord alxiord merged commit c2cd657 into firecracker-microvm:master Jan 16, 2019
@andreeaflorescu andreeaflorescu deleted the display_panic_info branch January 16, 2019 16:55
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.

4 participants