Catch boost::program_option::error exceptions in main()...

...preventing them from escaping and causing abnormal termination.
This commit is contained in:
Sergey Popov 2011-06-15 21:58:09 +00:00
parent 89032cf1ff
commit 855962c260

View file

@ -613,6 +613,8 @@ int main(int argc, char** argv)
const int res = do_gameloop(argc,argv);
safe_exit(res);
} catch(boost::program_options::error& e) {
std::cerr << "Error in command line: " << e.what() << '\n';
} catch(CVideo::error&) {
std::cerr << "Could not initialize video. Exiting.\n";
return 1;