Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::anonymous_namespace{exceptions.cpp}::IMessageWriter Class Referenceabstract
+ Inheritance diagram for gmx::anonymous_namespace{exceptions.cpp}::IMessageWriter:

Description

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...
 

Member Function Documentation

virtual void gmx::anonymous_namespace{exceptions.cpp}::IMessageWriter::writeErrNoInfo ( int  errorNumber,
const char *  funcName,
int  indent 
)
pure virtual

Writes information about a system error (errno-based).

Parameters
[in]errorNumbererrno value
[in]funcNameName of the system call (can be NULL).
[in]indentSuggested 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.

virtual void gmx::anonymous_namespace{exceptions.cpp}::IMessageWriter::writeLine ( const char *  text,
int  indent 
)
pure virtual

Writes a single line of text into the output.

Parameters
[in]textText to write on the line.
[in]indentSuggested 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.


The documentation for this class was generated from the following file: