X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Futility%2Fexceptions.h;h=493ee6bb6052a5b8d13e3de8d4318a24e57193c1;hb=180cf1538ad2b19bd6b4108662adc4a519565fcb;hp=40d723b8f516190447e1de215306c071d46d9a0d;hpb=1d597ac0415f9a847715ef65daa55fe1312bd59f;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/utility/exceptions.h b/src/gromacs/utility/exceptions.h index 40d723b8f5..493ee6bb60 100644 --- a/src/gromacs/utility/exceptions.h +++ b/src/gromacs/utility/exceptions.h @@ -60,6 +60,8 @@ namespace gmx { +class TextWriter; + namespace internal { //! Internal container type for storing a list of nested exceptions. @@ -444,6 +446,15 @@ std::string formatExceptionMessageToString(const std::exception &ex); * \throws std::bad_alloc if out of memory. */ void formatExceptionMessageToFile(FILE *fp, const std::exception &ex); +/*! \brief + * Formats an error message for reporting an exception. + * + * \param writer Writer to use for writing the message. + * \param[in] ex Exception to format. + * \throws std::bad_alloc if out of memory. + */ +void formatExceptionMessageToWriter(TextWriter *writer, + const std::exception &ex); /*! \brief * Handles an exception that is causing the program to terminate. *