Log Backtrace / Stacktrace with a custom ErrorHandler #740
Unanswered
vincent-herlemont
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I personally use sentry and it knows the stack trace IIRC. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is possible to return the line number/backtrace or event custom backtrace when we log errors with
CustomErrorHandler
?NOTE: Some libraries allow to customize stack trace and offer divers report improvements like miette, stable_eyre etc. There is some method to retrieve manually the line number when the program panic here: Getting line numbers with
?
as I would withunwrap()
.More context
Below is an example to log a panic produces by
unreachable!()
.We can see it that only the message of
throw error
is displayed.In this case, it should be greater to retrieve the file name and line number. Here is the goal of this discussion.
Related to:
Beta Was this translation helpful? Give feedback.
All reactions