Rudiments

- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

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 int32_t | getNativeErrorNumber ()
static char * | getNativeErrorString ()

## Detailed Description

The error class provides an interface to system errors.

## Member Function Documentation

static void error::clearError | ( |  | ) |
| static

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

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.

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.

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().

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.

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.