TrajectoryAnalysisCommandLineRunner runner(&module);
return runner.run(argc, argv);
}
- catch (std::exception &ex)
+ catch (const std::exception &ex)
{
fprintf(stderr, "%s", gmx::formatErrorMessage(ex).c_str());
return 1;
// The actual code for the program
return 0;
}
- catch (std::exception &ex)
+ catch (const std::exception &ex)
{
fprintf(stderr, "%s", gmx::formatErrorMessage(ex).c_str());
return 1;
{
_impl->_assigner.finishOption();
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
errors.append(ex.what());
}
const char *name = &argv[i][1];
_impl->_assigner.startOption(name);
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
bDiscard = true;
errors.append(ex.what());
{
_impl->_assigner.appendValue(argv[i]);
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
errors.append(ex.what());
}
{
_impl->_assigner.finishOption();
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
errors.append(ex.what());
}
{
option->finish();
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
MessageStringContext context(&errors, "In option " + option->name());
errors.append(ex.what());
{
section->finish();
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
errors.append(ex.what());
}
EXPECT_NO_THROW(assigner.finish());
EXPECT_TRUE(value);
}
- catch (gmx::InvalidInputError &)
+ catch (const gmx::InvalidInputError &)
{
}
}
if (sel->u.expr.method->pupdate)
{
/* Need to translate exceptions to error codes because the parser still
- * uses return codes for error handling. */
+ * uses return codes for error handling.
+ * Temporary solution for Redmine issue #880, exceptions should only
+ * occur here for internal errors... */
try
{
/* By default, use whole residues/molecules. */
gmx_ana_poscalc_create_enum(&sel->u.expr.pc, pcc, rpost,
POS_COMPLWHOLE);
}
- catch (gmx::GromacsException &ex)
+ catch (const gmx::GromacsException &ex)
{
_gmx_selparser_error(scanner, ex.what());
return ex.errorCode();
}
- catch (...)
- {
- _gmx_selparser_error(scanner, "Unknown error!");
- return gmx::eeUnknownError;
- }
}
else
{
{
setMaxValueCount(count);
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
errors.append(ex.what());
}
TrajectoryAnalysisModuleData::Impl::~Impl()
{
- try
- {
- finishHandles();
- }
- catch (...)
- {
- }
}
{
parser.parse(argc, argv);
}
- catch (UserInputError &ex)
+ catch (const UserInputError &ex)
{
printHelp(*options, *common);
throw;
runner.setSelectionDebugLevel(1);
return runner.run(argc, argv);
}
- catch (std::exception &ex)
+ catch (const std::exception &ex)
{
fprintf(stderr, "%s", gmx::formatErrorMessage(ex).c_str());
return 1;
gmx::TrajectoryAnalysisCommandLineRunner runner(mod.get());
return runner.run(argc, argv);
}
- catch (std::exception &ex)
+ catch (const std::exception &ex)
{
fprintf(stderr, "%s", gmx::formatErrorMessage(ex).c_str());
return 1;