Skip to content

Can I custom the panic handling method? #1791

Discussion options

You must be logged in to vote

Panicking is not normal, and should not be treated as such. As the error message notes, Panicking causes unwinding, which is an expensive operation. Your code should NEVER panic; if an error condition is recoverable you should return Option or Result, which provides full control over the error message provided.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by zemelLeong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants