|
libdrmconf
0.10.4
A library to program DMR radios.
|
Implements a stack of error messages to provide a pretty formatted error traceback. More...
#include <errorstack.hh>

Classes | |
| class | Message |
| Represents a single error message. More... | |
| class | MessageStream |
| A helper class to assemble error messages as streams. More... | |
| class | Stack |
| The actual error message stack. More... | |
Public Member Functions | |
| ErrorStack () noexcept | |
| Default constructor. | |
| ErrorStack (const ErrorStack &other) | |
| Copy constructor. | |
| ~ErrorStack () | |
| Destructor. | |
| ErrorStack & | operator= (const ErrorStack &other) |
| Copy assignment. | |
| bool | isEmpty () const |
Returns true, if the stack is empty. | |
| unsigned | count () const |
| Returns the number of elements on the stack. | |
| const Message & | message (unsigned i) const |
| Returns the i-th message from the stack. | |
| void | push (const Message &msg) const |
| Pushes a message on the stack. | |
| void | take (const ErrorStack &other) const |
| Takes all messages from the other stack. | |
| QString | format (const QString &indent=" ") const |
| Returns a formatted string of error messages. | |
Protected Attributes | |
| Stack * | _stack |
| A reference to the actual message stack. | |
Implements a stack of error messages to provide a pretty formatted error traceback.
This class is intended to be used like:
The error message can then be obtained using the public methods. E.g.,