PicoStorage

Lightweight Structured Storage

Exception documentation

Exception class for the exceptions thrown by PicoStorage methods

The exceptional condition can have two different origins: either from the operating system (e.g. disk full), or internal from the PicoStorage library (e.g. invalid storage file).

int getErrno();

Returns the platform-dependent OS error code.

For the exceptions originating from PicoStorage, (which aren't caused by the OS), getErrno() returns 0.

int getReason();

Returns the platform-independent error code.

In the case of operating system generated exceptions, reason is a translation of errno, and is negative. For the exceptions originating from PicoStorage, reason is positive.

const char * getMessage();

Returns a textul description of the condition type

const char * getDetail();

Returns a string containing more detail about the context of the exception, when available. May return an empty string.