using System;
namespace LibNftables;
///
/// Base exception for managed nftables failures.
///
public class NftException : InvalidOperationException
{
///
/// Initializes a new exception instance.
///
/// Error message.
/// Native error code, when available.
/// Native error output, when available.
/// Optional inner exception.
public NftException(string message, int nativeErrorCode = 0, string? nativeErrorOutput = null, Exception? innerException = null)
: base(message, innerException)
{
NativeErrorCode = nativeErrorCode;
NativeErrorOutput = nativeErrorOutput;
}
///
/// Gets the native error code.
///
public int NativeErrorCode { get; }
///
/// Gets native error output text.
///
public string? NativeErrorOutput { get; }
}