Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUI/CommandLineParser.cpp

    r690741 r11d433  
    5252#include "CommandLineParser.hpp"
    5353#include "CommandLineParser_validate.hpp"
     54#include "World.hpp"
    5455
    5556#include "CodePatterns/Singleton_impl.hpp"
     
    430431void CommandLineParser::Parse()
    431432{
    432   po::store(po::command_line_parser(argc,argv).options(cmdline_options).run(), vm);
     433  try {
     434    po::store(po::command_line_parser(argc,argv).options(cmdline_options).run(), vm);
     435  } catch (std::exception &e) {
     436    std::cerr << "Something went wrong with parsing the command-line arguments." << std::endl;
     437    World::getInstance().setExitFlag(134);
     438#ifdef HAVE_ACTION_THREAD
     439    // force action queue to stop thread
     440    ActionQueue::getInstance().stop();
     441#endif
     442    ActionQueue::getInstance().clearQueue();
     443  }
    433444  std::ifstream input;
    434445  input.open("example.cfg");
Note: See TracChangeset for help on using the changeset viewer.