error-stack: Pretty print error without the source location of the error #1215
-
Is there any way to get error stack to pretty print the full message without showing the location in the source file where the error originated from? I think that the formatted output is very usable as a user facing error message but I don't want to have the source location in the print out. Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @jrmoulton and thanks for asking! This is a very good question and currently, this is not possible. However, we are planning to add support for this by adding hook support for the location as well, so you will be able to call I will keep you updated when this feature is implemented. |
Beta Was this translation helpful? Give feedback.
-
This feature is now available starting at revision 801727c and will be available with |
Beta Was this translation helpful? Give feedback.
Hi @jrmoulton and thanks for asking!
This is a very good question and currently, this is not possible. However, we are planning to add support for this by adding hook support for the location as well, so you will be able to call
Report::install_debug_hook::<Location>(...)
. This will enable the user to either change the output of the location or don't write anything to the output at all.I will keep you updated when this feature is implemented.