1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00

rwgame: catch boost::exception

Boost.program_options throws boost::exception on macosx's xcode
This commit is contained in:
Anonymous Maarten 2019-01-05 03:23:14 +01:00
parent 548ff80909
commit 1ccec04148

View File

@ -118,9 +118,13 @@ std::optional<RWArgConfigLayer> RWArgumentParser::parseArguments(int argc, const
po::store(parser.run(), vm);
}
po::notify(vm);
} catch (po::error &ex) {
} catch (po::error& ex) {
std::cerr << "Error parsing arguments: " << ex.what() << std::endl;
return std::nullopt;
} catch (boost::exception& ex) {
std::cerr << "A boost::exception object was thrown (bug in Boost.Program_options?).\n";
std::cerr << "unknown error\n";
return std::nullopt;
}
RWArgConfigLayer layer;