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

Expose a function to stringify a PanicInfo struct #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ekleog
Copy link

@Ekleog Ekleog commented Dec 4, 2022

This allows users who want to display the error message generated by console_error_panic_hook outside of the console to do it without having to reimplement javascript-based stack walking themselves.


Hey! I'm in the process of trying to be nicer to users upon panic, displaying an error page on my yew app instead of just crashing and dumping logs to the console (source). However, I'd rather avoid reimplementing the stack walking that console_error_panic_hook implemented in order to tell the user what they should copy-paste to the issue tracker.

So I thought of just exposing it from console_error_panic_hook, though it may be slightly outside of the expected API surface for it.

WDYT?

This allows users who want to display the error message generated by console_error_panic_hook outside of the console to do it without having to reimplement javascript-based stack walking themselves.
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.

1 participant