isoltest: Handle parsing errors differently from unexpected exceptions

This commit is contained in:
Kamil Śliwak 2021-11-15 17:47:21 +01:00
parent 3c5930dd8e
commit ed8403f456

View File

@ -499,9 +499,20 @@ int main(int argc, char const *argv[])
return global_stats ? 0 : 1; return global_stats ? 0 : 1;
} }
catch (std::exception const& _exception) catch (boost::program_options::error const& exception)
{ {
cerr << _exception.what() << endl; cerr << exception.what() << endl;
return 1;
}
catch (std::runtime_error const& exception)
{
cerr << exception.what() << endl;
return 1;
}
catch (...)
{
cerr << "Unhandled exception caught." << endl;
cerr << boost::current_exception_diagnostic_information() << endl;
return 1; return 1;
} }
} }