Ignore:
Timestamp:
05/24/11 19:34:26 (13 years ago)
Author:
tbretz
Message:
Simplified program options handling.
File:
1 edited

Legend:

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

    r10795 r10804  
    2222 */
    2323 //****************************************************************
    24 #include "FACT.h"
    2524#include "Event.h"
    2625#include "StateMachineDim.h"
     
    681680        vm = conf.Parse(argc, argv);
    682681    }
     682#if BOOST_VERSION > 104000
     683    catch (po::multiple_occurrences &e)
     684    {
     685        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
     686        return -1;
     687    }
     688#endif
    683689    catch (exception& e)
    684690    {
    685         cout << "Sorry, could not properly parse the program's arguments. returning" << endl;
    686         cout << e.what() << endl;
     691        cerr << "Program options invalid due to: " << e.what() << endl;
    687692        return -1;
    688693    }
    689694
    690     if (conf.HasPrint())
    691             return -1;
    692     if (conf.HasVersion())
    693     {
    694         FACT::PrintVersion(argv[0]);
     695    if (conf.HasVersion() || conf.HasPrint())
    695696        return -1;
    696     }
    697697
    698698    if (conf.HasHelp())
Note: See TracChangeset for help on using the changeset viewer.