Name

error_array -- Return all library messages and clear the message stack

Synopsis

array error_array ( )

Description

This method returns all the library messages on the message stack in reverse cronological order (newest to oldest). The result is stored in an array of strings, with each element containing both the error number and message.

All methods return a result that equates to true apon success, and false on error. If an error is indicated, this command can be used to get the details of the error.

It's possible for errors to "chain", such that the problem that caused the error actually resulted in additional errors added to the message stack by calling functions within the library. This makes for accurate debugging information since the error is traced all the way back to its original cause.

Examples

See Also

Error codes and their meanings
pop_error()

History

This command was added in version 2 of the library.

Bugs

Currently only one non-failure condition results in a message added to the message stack (#3001) but there is no way to determine if this condition has occurred, short of checking the message stack via this or the pop_error() function.