X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fcommandline%2Fcmdlineinit.h;h=0f95039cbcfb45f12afa13be5fc9f80391efa498;hb=37573afb8aea3688b3bb2fe30919300efe198ac0;hp=ae4089f4aea58c462297cb1a50de6e5683a944da;hpb=4488887e17c2ad98c5885a8181fc460158e1476a;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/commandline/cmdlineinit.h b/src/gromacs/commandline/cmdlineinit.h index ae4089f4ae..0f95039cbc 100644 --- a/src/gromacs/commandline/cmdlineinit.h +++ b/src/gromacs/commandline/cmdlineinit.h @@ -92,7 +92,19 @@ CommandLineProgramContext &initForCommandLine(int *argc, char ***argv); * \ingroup module_commandline */ void finalizeForCommandLine(); - +/*! \brief + * Handles an exception and deinitializes after initForCommandLine. + * + * \param[in] ex Exception that is the cause for terminating the program. + * \returns Return code to return from main(). + * + * This method should be called as the last thing before terminating the + * program because of an exception. See processExceptionAtExit() for details. + * Additionally this method undoes the work done by initForCommandLine. + * + * Does not throw. + */ +int processExceptionAtExitForCommandLine(const std::exception &ex); /*! \brief * Implements a main() method that runs a single module. *