Ignore:
Timestamp:
07/24/11 21:20:34 (13 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++/src/chatserv.cc

    r11574 r11578  
    7979    SetupConfiguration(conf);
    8080
    81     po::variables_map vm;
    82     try
    83     {
    84         vm = conf.Parse(argc, argv);
    85     }
    86 #if BOOST_VERSION > 104000
    87     catch (po::multiple_occurrences &e)
    88     {
    89         cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
     81    if (!conf.DoParse(argc, argv, PrintHelp))
    9082        return -1;
    91     }
    92 #endif
    93     catch (exception& e)
    94     {
    95         cerr << "Program options invalid due to: " << e.what() << endl;
    96         return -1;
    97     }
    98 
    99     if (conf.HasVersion() || conf.HasPrint())
    100         return -1;
    101 
    102     if (conf.HasHelp())
    103     {
    104         PrintHelp();
    105         return -1;
    106     }
    10783
    10884    Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
Note: See TracChangeset for help on using the changeset viewer.