-
Notifications
You must be signed in to change notification settings - Fork 66
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
Human panic only when it's intended for humans #48
Comments
This sounds reasonable to me! |
Alternatively we could only set up the panic handler if compiled in release mode. |
That's not a bad idea! This is most likely in line with what people would want, behavior-wise anyway. Guess that might be another one for the 2.0 list? |
@spacekookie Well, does it have to be "alternatively"? :) How about:
|
We'd need to document this well enough that people don't get confused but yea, that's not a bad workflow! |
This has now landed in |
Ok, looks like this has still not made it to a release. Could we may be add an optional flag into the macro in a non-breaking way to get this without waiting on a full blown release? |
Currently the
setup_panic!
macro sets itself up unconditionally. I think a good default would be to ignore itself ifRUST_BACKTRACE
is setup up explicitly - that way it's not intended for normal humans, but for an environment that already expects the standard rust backtraces, or for developers who explicitly want to turn this on.This also makes it immensely useful by default during debugging, and development, as there's no need to wrap the setup_panic around a condition. I like the one setup, and would like to avoid putting an ugly wrapper around it. Clearly, this is not something intended during the development process.
Hopefully, most people feel the same, and this can be the default behavior! :)
The text was updated successfully, but these errors were encountered: