sapling/eden/scm/tests/test-debugthrowrustexception.t
Meyer Jacobs f9958ca35a taggederror: introduce category and transience metadata and precedence
Summary:
This change introduces two new metadata types, Category and Transience, and a mechanism for Category to provide a default Fault and Transience, which can be overriden by the user.

Also introduces a mechanism for attempting to log exceptions which occur during exception logging, falling back to the previous behavior of just swallowing the exception on failure.

Reviewed By: DurhamG

Differential Revision: D22677565

fbshipit-source-id: 1cf75ca1e2a65964a0ede1f072439378a46bd391
2020-10-12 17:17:34 -07:00

16 lines
801 B
Raku

$ configure modern
$ newserver master
Test debugthrowrustexception error formatting
$ hg debugthrowrustexception 2>&1 | egrep -v '^ '
\*\* Mercurial Distributed SCM * has crashed: (glob)
Traceback (most recent call last):
*RustError: intentional error for debugging with message 'intentional_error' (glob)
$ hg debugthrowrustexception --traceback 2>&1 | egrep -v '^ '
Traceback (most recent call last):
*RustError: intentional error for debugging with message 'intentional_error' (glob)
error has type name taggederror::IntentionalError, category programming, transience permanent, and fault request
\*\* Mercurial Distributed SCM * has crashed: (glob)
Traceback (most recent call last):
*RustError: intentional error for debugging with message 'intentional_error' (glob)