This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37

View file

@ -0,0 +1,17 @@
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;
}
}