Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
exceptions.cpp File Reference
#include "gmxpre.h"
#include "gromacs/utility/exceptions.h"
#include <cstring>
#include <map>
#include <memory>
#include <new>
#include <stdexcept>
#include <typeinfo>
#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/textwriter.h"
#include "errorcodes.h"
#include "errorformat.h"
+ Include dependency graph for exceptions.cpp:

Description

Implements classes and functions in exceptions.h.

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Classes

class  gmx::anonymous_namespace{exceptions.cpp}::ErrorMessage
 Error message or error context text item. More...
 
class  gmx::anonymous_namespace{exceptions.cpp}::IMessageWriter
 Abstracts actual output from the other logic in exception formatting. More...
 
class  gmx::anonymous_namespace{exceptions.cpp}::MessageWriterFileNoThrow
 Exception information writer for cases where exceptions should be avoided. More...
 
class  gmx::anonymous_namespace{exceptions.cpp}::MessageWriterTextWriter
 Exception information writer to format into a TextOutputStream. More...
 
class  gmx::anonymous_namespace{exceptions.cpp}::MessageWriterString
 Exception information writer to format into an std::string. More...
 

Typedefs

typedef ExceptionInfo< struct
ExceptionInfoMessage_,
ErrorMessage > 
gmx::anonymous_namespace{exceptions.cpp}::ExceptionInfoMessage
 Stores a reason or the top-most context string of an exception. More...
 
typedef ExceptionInfo< struct
ExceptionInfoNestedExceptions_,
internal::NestedExceptionList > 
gmx::anonymous_namespace{exceptions.cpp}::ExceptionInfoNestedExceptions
 Stores list of nested exceptions for Gromacs exceptions.
 

Functions

void gmx::anonymous_namespace{exceptions.cpp}::formatExceptionMessageInternal (IMessageWriter *writer, const std::exception &ex, int indent)
 Prints error information for an exception object. More...
 
void gmx::printFatalErrorMessage (FILE *fp, const std::exception &ex)
 Formats a standard fatal error message for reporting an exception. More...
 
std::string gmx::formatExceptionMessageToString (const std::exception &ex)
 Formats an error message for reporting an exception. More...
 
void gmx::formatExceptionMessageToFile (FILE *fp, const std::exception &ex)
 Formats an error message for reporting an exception. More...
 
void gmx::formatExceptionMessageToWriter (TextWriter *writer, const std::exception &ex)
 Formats an error message for reporting an exception. More...
 
int gmx::processExceptionAtExit (const std::exception &ex)
 Handles an exception that is causing the program to terminate. More...
 
void gmx::processExceptionAsFatalError (const std::exception &ex)
 Helper function for terminating the program on an exception. More...