diff --git a/src/utils/OptionParser.cpp b/src/utils/OptionParser.cpp index 72ae9273d2..c5e2c64e1f 100644 --- a/src/utils/OptionParser.cpp +++ b/src/utils/OptionParser.cpp @@ -7,11 +7,10 @@ #include "OptionParser.h" -#include "utils/mardyn_assert.h" - -#include #include #include +#include +#include #include #ifdef ENABLE_MPI @@ -448,15 +447,13 @@ void OptionParser::print_version() const { } void OptionParser::exit() const { - std::ostringstream error_message; - error_message << "OptionParser::exit() called" << std::endl; - MARDYN_EXIT(error_message.str()); + std::cerr << "OptionParser::exit() called" << std::endl; + std::exit(1); } void OptionParser::error(const std::string& msg) const { + std::cerr << "Optionparser error: " << msg << std::endl; print_usage(std::cerr); - std::ostringstream error_message; - error_message << prog() << ": " << _("error") << ": " << msg << std::endl; - MARDYN_EXIT(error_message.str()); + std::exit(1); } ////////// } class OptionParser //////////