Catch boost::program_option::error exceptions in main()...
...preventing them from escaping and causing abnormal termination.
This commit is contained in:
parent
89032cf1ff
commit
855962c260
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue