Class MacException
Provides the base exception class for all the macOS
native API errors.
The errors typically provide an OSStatus error code describing
the error condition, that's why this exception derives
from ExternalException.
The macOS wrappers provided by this assembly
will provide exception classes derived
from this exception class.
public class MacException : ExternalException, ISerializable
- Inheritance
-
MacException
- Implements
- Derived
- Inherited Members
Constructors
MacException(int)
Constructs a new instance of the MacException class with the specified
OSStatus error code.
public MacException(int osStatus)
Parameters
osStatusintThe status code.
MacException(string, int)
Constructs a new instance of the MacException class with the specified
OSStatus error code, as well as the custom error message to provide.
public MacException(string message, int osStatus)
Parameters
messagestringThe custom error message to provide. Can be null.
osStatusintThe
OSStatuserror code to provide.
Properties
ErrorCode
Provides the OSStatus code that is the reason why
this MacException object was created for.
public override int ErrorCode { get; }