Allow runAsMainSingleModule to be called more than once
[alexxy/gromacs.git] / src / programs / gmx.cpp
index a0bcc6fb270953b6d72e23435101a9ba71f6f907..94a668eadb5d45e1ff0990dcf9deb890d2ece3b4 100644 (file)
  *
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  */
-#include "gromacs/commandline/cmdlinemodulemanager.h"
+#include "gmxpre.h"
+
 #include "gromacs/commandline/cmdlineinit.h"
+#include "gromacs/commandline/cmdlinemodulemanager.h"
 #include "gromacs/selection/selhelp.h"
 #include "gromacs/trajectoryanalysis/modules.h"
 #include "gromacs/utility/exceptions.h"
@@ -62,6 +64,6 @@ main(int argc, char *argv[])
     catch (const std::exception &ex)
     {
         gmx::printFatalErrorMessage(stderr, ex);
-        return gmx::processExceptionAtExit(ex);
+        return gmx::processExceptionAtExitForCommandLine(ex);
     }
 }