spectre.console/src/Spectre.Console/Cli/CommandAppException.cs
Patrik Svensson 0ae419326d Add Spectre.Cli to Spectre.Console
* Renames Spectre.Cli to Spectre.Console.Cli.
* Now uses Verify with Spectre.Console.Cli tests.
* Removes some duplicate definitions.

Closes #168
2020-12-28 17:28:03 +01:00

27 lines
707 B
C#

using System;
using Spectre.Console.Rendering;
namespace Spectre.Console.Cli
{
/// <summary>
/// Represents errors that occur during application execution.
/// </summary>
public abstract class CommandAppException : Exception
{
internal IRenderable? Pretty { get; }
internal virtual bool AlwaysPropagateWhenDebugging => false;
internal CommandAppException(string message, IRenderable? pretty = null)
: base(message)
{
Pretty = pretty;
}
internal CommandAppException(string message, Exception ex, IRenderable? pretty = null)
: base(message, ex)
{
Pretty = pretty;
}
}
}