![]() |
Prev | Next |
stored_message = error_message(input_message)
input_message
is not the empty string,
it is stored in error_message
and an exception is thrown.
This is intended to be done inside a try
block.
std::runtime_error
which is derived from std::exception
.
If the standard exception what()
is called,
the return value will be the value of
input_message
when the exception was thrown.
input_message
is the empty string,
the most recently stored message in error_message
is returned.
In addition, the message is deleted from error_message
.
If there are no more messages stored in error_message
,
the empty string is returned.
This is intended to be done inside a catch
block.
error_message
.
error_message
and hence is not thread safe.