Xecrets.Sdk.XfException.md
May 26, 2026 · View on GitHub
Xecrets.Sdk
Xecrets.Sdk
XfException Class
The exception type thrown when something goes wrong calling the command line tool. In addition to the base class System.Exception there is an ExitCode property containing the actual exit code from the tool. Exit codes are System.Int32 but they are mapped to enum Xecrets.Sdk.Models.XfStatusCode here. To ensure that the mapping is correct, call IsSdkCompatibleWith(Version) ./>
public class XfException : System.Exception
Inheritance System.Object → System.Exception → XfException
Constructors
XfException(int, string) Constructor
Initializes a new instance of the XfException class with a specified message and exit code.
public XfException(int exitCode, string message);
Parameters
exitCode System.Int32
The command line exit code.
message System.String
The message.
XfException(int, string, IEnumerable) Constructor
Initializes a new instance of the XfException class with a specified message, exit code and item.
public XfException(int exitCode, string message, System.Collections.Generic.IEnumerable<string> args);
Parameters
exitCode System.Int32
The command line exit code.
message System.String
The message.
args System.Collections.Generic.IEnumerable<System.String>
The arguments(s) causing the exception
XfException(int, string, Exception) Constructor
Initializes a new instance of the XfException class with a specified message, exit code and inner exception.
public XfException(int exitCode, string message, System.Exception ex);
Parameters
exitCode System.Int32
The command line tool exit code.
message System.String
The message.
The inner exception.
XfException(int, XfSubStatusCode, string, IEnumerable) Constructor
Initializes a new instance of the XfException class with a specified message, exit code, files and sub status code.
public XfException(int exitCode, Xecrets.Sdk.Models.XfSubStatusCode subStatusCode, string message, System.Collections.Generic.IEnumerable<string> files);
Parameters
exitCode System.Int32
The command line exit code.
subStatusCode Xecrets.Sdk.Models.XfSubStatusCode
The sub status code from the command line.
message System.String
The message.
files System.Collections.Generic.IEnumerable<System.String>
The files(s) causing the exception
XfException(string) Constructor
Initializes a new instance of the XfException class with a specified message.
public XfException(string message);
Parameters
message System.String
The message.
XfException(string, Exception) Constructor
Initializes a new instance of the XfException class with a specified message and inner exception.
public XfException(string message, System.Exception ex);
Parameters
message System.String
The message.
The inner exception.
Properties
XfException.Args Property
The file(s) that caused the exception.
public string[] Args { get; }
Property Value
XfException.ExitCode Property
The exit code from the command line tool.
public int ExitCode { get; }
Property Value
XfException.SubStatusCode Property
The sub status code from the command line tool.
public Xecrets.Sdk.Models.XfSubStatusCode SubStatusCode { get; }
Property Value
Xecrets.Sdk.Models.XfSubStatusCode
Methods
XfException.ToString() Method
Creates and returns a string representation of the current exception.
public override string ToString();