Changeset 10825 for trunk


Ignore:
Timestamp:
05/25/11 16:38:42 (13 years ago)
Author:
tbretz
Message:
Unified main() with the other programs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dataLogger.cc

    r10820 r10825  
    3939 */
    4040 //****************************************************************
    41 #include "FACT.h"
    4241#include "Dim.h"
    4342#include "Event.h"
     
    25652564        vm = conf.Parse(argc, argv);
    25662565    }
    2567     catch (exception &e)
    2568     {
    25692566#if BOOST_VERSION > 104000
    2570         po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e);
    2571         if (MO)
    2572             cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl;
    2573         else
     2567    catch (po::multiple_occurrences &e)
     2568    {
     2569        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
     2570        return -1;
     2571    }
    25742572#endif
    2575             cout << "Error: " << e.what() << endl;
    2576         cout << endl;
    2577 
     2573    catch (exception& e)
     2574    {
     2575        cerr << "Program options invalid due to: " << e.what() << endl;
    25782576        return -1;
    25792577    }
    25802578
    2581     if (conf.HasPrint())
     2579    if (conf.HasVersion() || conf.HasPrint())
    25822580        return -1;
    2583 
    2584     if (conf.HasVersion())
    2585     {
    2586         FACT::PrintVersion(argv[0]);
    2587         return -1;
    2588     }
    25892581
    25902582    if (conf.HasHelp())
Note: See TracChangeset for help on using the changeset viewer.