Gromacs
2024.3
|
Abstracts actual output from the other logic in exception formatting.
Object that implements this interface is passed to formatExceptionMessageInternal(), and is responsible for composing the output. This allows using the same implementation of interpreting the exceptions while still supporting output to different formats (e.g., to a string or to stderr
).
Public Member Functions | |
virtual void | writeLine (const char *text, int indent)=0 |
Writes a single line of text into the output. More... | |
virtual void | writeErrNoInfo (int errorNumber, const char *funcName, int indent)=0 |
Writes information about a system error (errno-based). More... | |
|
pure virtual |
Writes information about a system error (errno-based).
[in] | errorNumber | errno value |
[in] | funcName | Name of the system call (can be NULL). |
[in] | indent | Suggested number of spaces to indent the output. |
Implemented in gmx::anonymous_namespace{exceptions.cpp}::MessageWriterString, gmx::anonymous_namespace{exceptions.cpp}::MessageWriterTextWriter, and gmx::anonymous_namespace{exceptions.cpp}::MessageWriterFileNoThrow.
|
pure virtual |
Writes a single line of text into the output.
[in] | text | Text to write on the line. |
[in] | indent | Suggested number of spaces to indent the line. |
Implemented in gmx::anonymous_namespace{exceptions.cpp}::MessageWriterString, gmx::anonymous_namespace{exceptions.cpp}::MessageWriterTextWriter, and gmx::anonymous_namespace{exceptions.cpp}::MessageWriterFileNoThrow.