Changeset 11230 for trunk/FACT++/gui


Ignore:
Timestamp:
07/01/11 08:49:31 (13 years ago)
Author:
tbretz
Message:
Updated initialization process according to the other programs.
File:
1 edited

Legend:

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

    r10646 r11230  
    5454        vm = conf.Parse(argc, argv);
    5555    }
    56     catch (std::exception &e)
     56#if BOOST_VERSION > 104000
     57    catch (po::multiple_occurrences &e)
    5758    {
    58 #if BOOST_VERSION > 104000
    59         po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e);
    60         if (MO)
    61             cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl;
    62         else
     59        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
     60        return -1;
     61    }
    6362#endif
    64             cout << "Error: " << e.what() << endl;
    65         cout << endl;
    66 
     63    catch (exception& e)
     64    {
     65        cerr << "Program options invalid due to: " << e.what() << endl;
    6766        return -1;
    6867    }
    6968
    70     if (conf.HasPrint())
     69    if (conf.HasVersion() || conf.HasPrint())
    7170        return -1;
    72 
    73     if (conf.HasVersion())
    74     {
    75         FACT::PrintVersion(argv[0]);
    76         return -1;
    77     }
    7871
    7972    if (conf.HasHelp())
Note: See TracChangeset for help on using the changeset viewer.