Class FexCoreException
Exception thrown by FexApi wrappers when the DLL returns a non-OK result code. The numeric code is preserved on ErrorCode so callers can branch on it (e.g. to distinguish password-related failures from fatal errors).
Implements
Inherited Members
Namespace: FexViewer
Assembly: FexViewer.dll
Syntax
public sealed class FexCoreException : Exception, ISerializable
Constructors
FexCoreException()
Creates an exception with a generic error code.
Declaration
public FexCoreException()
FexCoreException(string)
Creates an exception with a message and a generic error code.
Declaration
public FexCoreException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description. |
FexCoreException(string, Exception)
Creates an exception wrapping an inner cause.
Declaration
public FexCoreException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description. |
| Exception | innerException | Underlying exception. |
FexCoreException(string, int)
Creates an exception with a message and a specific error code.
Declaration
public FexCoreException(string message, int errorCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description. |
| int | errorCode | Negative DLL result code. |
FexCoreException(string, int, Exception)
Creates an exception with both a specific code and an inner cause.
Declaration
public FexCoreException(string message, int errorCode, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description. |
| int | errorCode | Negative DLL result code. |
| Exception | innerException | Underlying exception. |
Properties
ErrorCode
The negative result code returned by the DLL, or FexViewer.NativeMethods.RESULT_ERROR if not specific.
Declaration
public int ErrorCode { get; }
Property Value
| Type | Description |
|---|---|
| int |