Class AuException
The base exception class used in this library. Thrown when something fails and there is no better exception type for that failure.
public class AuException : Exception, ISerializable
Remarks
Some constructors support Windows API error code. Then AuException.Message will contain its error description.
If the string passed to the constructor starts with "*", replaces the "*" with "Failed to ". If does not end with ".", appends ".".
Namespace: Au.Types
Assembly: Au.dll
Inherited Members
Constructors
| Name | Description |
|---|---|
| AuException(int, string, Exception) | Sets NativeErrorCode = |
| AuException(string, Exception) | Sets Message = message (default |
Fields
| Name | Description |
|---|---|
| FormattedMessage | String created by FormatMessage, which should be called by the Message override if |
Properties
| Name | Description |
|---|---|
| Message | Gets error message. |
| NativeErrorCode | Gets the Windows API error code. |
Methods
| Name | Description |
|---|---|
| FormatMessage(string, string) | Formats error message. Sets and returns FormattedMessage. |
| ThrowIfHresultNegative(int, string) | If errorCode is less than 0, throws AuException that includes the code and its message. More info: AuException.FormatMessage. |
| ThrowIfHresultNot0(int, string) | If errorCode is not 0, throws AuException that includes the code and its message. More info: AuException.FormatMessage. |