Changeset 11578 for trunk/FACT++/gui


Ignore:
Timestamp:
07/24/11 21:20:34 (14 years ago)
Author:
tbretz
Message:
Moved some part of the initialization from main to Configure::DoParse
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/fact.cc

    r11576 r11578  
    5151    SetupConfiguration(conf);
    5252
    53     po::variables_map vm;
    54     try
    55     {
    56         vm = conf.Parse(argc, argv);
    57     }
    58 #if BOOST_VERSION > 104000
    59     catch (po::multiple_occurrences &e)
    60     {
    61         cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
     53    if (!conf.DoParse(argc, argv, PrintHelp))
    6254        return -1;
    63     }
    64 #endif
    65     catch (exception& e)
    66     {
    67         cerr << "Program options invalid due to: " << e.what() << endl;
    68         return -1;
    69     }
    70 
    71     if (conf.HasVersion() || conf.HasPrint())
    72         return -1;
    73 
    74     if (conf.HasHelp())
    75     {
    76         PrintHelp();
    77         return -1;
    78     }
    7955
    8056    Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
Note: See TracChangeset for help on using the changeset viewer.