spectre.console/docs/input/exceptions.md
2020-10-05 07:03:02 +02:00

754 B

Title: Exceptions Order: 3

Exceptions isn't always readable when viewed in the terminal.
You can make exception a bit more readable by using the WriteException method.

AnsiConsole.WriteException(ex);

You can also shorten specific parts of the exception to make it even more readable, and make paths clickable hyperlinks. Whether or not the hyperlinks are clickable is up to the terminal.

AnsiConsole.WriteException(ex, 
    ExceptionFormat.ShortenPaths | ExceptionFormat.ShortenTypes |
    ExceptionFormat.ShortenMethods | ExceptionFormat.ShowLinks);