smjg.libs.sdwf.except.DefinedAPIException Class Reference

The smjg.libs.sdwf.except.DefinedAPIException class represents an error generated by a Windows API call that uses SetLastError to set an error code. More...

Inheritance diagram for smjg.libs.sdwf.except.DefinedAPIException:

smjg.libs.sdwf.except.SDWFException

List of all members.

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.


Detailed Description

The smjg.libs.sdwf.except.DefinedAPIException class represents an error generated by a Windows API call that uses 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.

Since:
0.3

Member Function Documentation

static void smjg.libs.sdwf.except.DefinedAPIException.validate ( int  result,
string  fName,
string  callName 
) [static]

Checks that a Windows API function call has succeeded.

Parameters:
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.
Exceptions:
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.

Parameters:
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.
Exceptions:
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.

Parameters:
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.
Exceptions:
DefinedAPIException if the Windows API call was an error condition.
Deprecated:
Superseded by DefinedAPIException.validate(int, string, string)

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.

Parameters:
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.
Exceptions:
DefinedAPIException if the Windows API call was an error condition.
Deprecated:
Superseded by DefinedAPIException.validate(void*, string, string)


Member Data Documentation

uint smjg.libs.sdwf.except.DefinedAPIException.errorCode

The error code as was set by Windows.


The documentation for this class was generated from the following file:
Generated on Sun Jan 11 21:54:12 2009 for Stewart's D Windows Framework by  doxygen 1.5.4