mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-31 02:08:08 +01:00
Add support for rendering exceptions
This commit is contained in:
committed by
Patrik Svensson
parent
971f9032ba
commit
3c3afe7439
41
src/Spectre.Console/ExceptionFormat.cs
Normal file
41
src/Spectre.Console/ExceptionFormat.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
|
||||
namespace Spectre.Console
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents how an exception is formatted.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum ExceptionFormats
|
||||
{
|
||||
/// <summary>
|
||||
/// The default formatting.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not paths should be shortened.
|
||||
/// </summary>
|
||||
ShortenPaths = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not types should be shortened.
|
||||
/// </summary>
|
||||
ShortenTypes = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not methods should be shortened.
|
||||
/// </summary>
|
||||
ShortenMethods = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to show paths as links in the terminal.
|
||||
/// </summary>
|
||||
ShowLinks = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Shortens everything that can be shortened.
|
||||
/// </summary>
|
||||
ShortenEverything = ShortenMethods | ShortenTypes | ShortenPaths,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user