SetLastError
to set an error code.
More...
Static Public Member Functions | |
static void | validate (int result, string fName, string callName) |
Checks that a Windows API function call has succeeded. | |
static void | validate (void *result, string fName, string callName) |
Checks that an Windows API function call has succeeded. | |
static deprecated void | validate (int result) |
Checks that a Windows API function call has succeeded. | |
static deprecated void | validate (void *result) |
Checks that an Windows API function call has succeeded. | |
Public Attributes | |
uint | errorCode |
The error code as was set by Windows. |
SetLastError
to set an error code.
This class is mainly used internally by SDWF functions, though it may be used by the programmer when calling a Windows API function directly.
static void smjg.libs.sdwf.except.DefinedAPIException.validate | ( | int | result, | |
string | fName, | |||
string | callName | |||
) | [static] |
Checks that a Windows API function call has succeeded.
result | a value that will always be zero if the API call has failed. Usually this will be the value returned from the API function itself. Even if the API function sometimes returns zero in non-error conditions, validate automatically handles this case. | |
fName | name of the Windows API function being validated. | |
callName | name of the SDWF function that called the Windows API function. |
DefinedAPIException | if the Windows API call was an error condition. |
static void smjg.libs.sdwf.except.DefinedAPIException.validate | ( | void * | result, | |
string | fName, | |||
string | callName | |||
) | [static] |
Checks that an Windows API function call has succeeded.
This function is syntactic sugar for DefinedAPIException.validate(int, string), to be used with Windows API functions that return pointers.
result | a pointer value that will always be null if the API call has failed. Usually this will be the value returned from the API function itself. Even if the API function sometimes returns null in non-error conditions, this function automatically handles this case. | |
fName | name of the Windows API function being validated. | |
callName | name of the SDWF function that called the Windows API function. |
DefinedAPIException | if the Windows API call was an error condition. |
static deprecated void smjg.libs.sdwf.except.DefinedAPIException.validate | ( | int | result | ) | [static] |
Checks that a Windows API function call has succeeded.
result | a value that will always be zero if the API call has failed. Usually this will be the value returned from the API function itself. Even if the API function sometimes returns zero in non-error conditions, validate automatically handles this case. |
DefinedAPIException | if the Windows API call was an error condition. |
static deprecated void smjg.libs.sdwf.except.DefinedAPIException.validate | ( | void * | result | ) | [static] |
Checks that an Windows API function call has succeeded.
This function is syntactic sugar for DefinedAPIException.validate(int, string), to be used with Windows API functions that return pointers.
result | a pointer value that will always be null if the API call has failed. Usually this will be the value returned from the API function itself. Even if the API function sometimes returns null in non-error conditions, this function automatically handles this case. |
DefinedAPIException | if the Windows API call was an error condition. |
The error code as was set by Windows.