mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-30 06:42:51 +08:00

* Renames Spectre.Cli to Spectre.Console.Cli. * Now uses Verify with Spectre.Console.Cli tests. * Removes some duplicate definitions. Closes #168
27 lines
707 B
C#
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;
|
|
}
|
|
}
|
|
} |