Rudiments
Static Public Member Functions | List of all members
error Class Reference

Static Public Member Functions

static void clearError ()
 
static void setErrorNumber (int32_t err)
 
static int32_t getErrorNumber ()
 
static char * getErrorString ()
 
static void clearNativeError ()
 
static void setNativeErrorNumber (int32_t err)
 
static int32_t getNativeErrorNumber ()
 
static char * getNativeErrorString ()
 

Detailed Description

The error class provides access to system errors.

Member Function Documentation

◆ clearError()

static void error::clearError ( )
static

Set the current posix system error to 0, "Success".

◆ clearNativeError()

static void error::clearNativeError ( )
static

Set the current native error to 0, "Success". For systems (like Windows) that have their own native error number system, distinct from posix, this method sets that error number. For systems where the posix system error is the native error, this method has the same effect as clearError().

◆ getErrorNumber()

static int32_t error::getErrorNumber ( )
static

Returns the current posix system error. Will match one of the posix system errors such as EINTR, ENOMEM, etc.

◆ getErrorString()

static char* error::getErrorString ( )
static

Returns a string representation of the current posix system error. Note that the return value is allocated internally and returned, and must be freed by the calling program.

◆ getNativeErrorNumber()

static int32_t error::getNativeErrorNumber ( )
static

Returns the current native error number. For systems (like Windows) that have their own native error number system, distinct from posix, this method returns that error number. For systems where the posix system error is the native error, this method returns the same error as getErrorNumber().

◆ getNativeErrorString()

static char* error::getNativeErrorString ( )
static

Returns a string representatation of the current native system error as returned by getNativeErrorNumber(). Note that the return value is allocated internally and returned, and must be freed by the calling program.

◆ setErrorNumber()

static void error::setErrorNumber ( int32_t  err)
static

Set the current posix system error to "err". "err" should be one of the posix system errors such as EINTR, ENOMEM, etc.

◆ setNativeErrorNumber()

static void error::setNativeErrorNumber ( int32_t  err)
static

Set the current native system error to "err". For systems (like Windows) that have their own native error number system, distinct from posix, this method sets that error number. For systems where the posix system error is the native error, this method has the same effect as setError().