Name

pop_error -- Return the last library message and remove it from the message stack

Synopsis

int pop_error ( int &error_num, string &error_message )

Description

This method returns the most recent library message and number (via the error_num and error_message variables) and removes it from the library message stack.

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.

The error number and message are stored in the provided variables which are passed by reference. The error number is also returned or false if there are no more messages on the message stack.

Examples

See Also

Error codes and their meanings
error_array()

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