brutal/Brutal.NotCurses/NcResultException.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

17 lines
466 B
C#

namespace Brutal.NotCursesApi;
/// <summary>
/// Thrown by generated wrappers when a notcurses C function returns a failure result.
/// </summary>
public class NcResultException : Exception
{
public int Result { get; }
public string FunctionName { get; }
public NcResultException(string functionName, int result)
: base($"{functionName} failed with result {result}.")
{
FunctionName = functionName;
Result = result;
}
}