Changeset 10707 for trunk/FACT++/src/triggerschedule.cc
- Timestamp:
- 05/13/11 15:48:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/triggerschedule.cc
r10683 r10707 13 13 config.add_options() 14 14 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 15 ("schedule-database", var<string>() ,"Database name for scheduling preview")15 ("schedule-database", var<string>()->required(), "Database name for scheduling preview") 16 16 ; 17 17 … … 64 64 vm = conf.Parse(argc, argv); 65 65 } 66 #if BOOST_VERSION > 104000 67 catch (po::multiple_occurrences &e) 68 { 69 cout << "Error: " << e.what() << " of '" << e.get_option_name() << "' option." << endl; 70 cout << endl; 71 return -1; 72 } 73 #endif 66 74 catch (std::exception &e) 67 75 { 68 #if BOOST_VERSION > 104000 69 po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e); 70 if (MO) 71 cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl; 72 else 73 #endif 74 cout << "Error: " << e.what() << endl; 76 cout << "Error: " << e.what() << endl; 75 77 cout << endl; 76 78 … … 93 95 } 94 96 95 if (!conf.Has("schedule-database"))96 {97 cout << "Please provide which database you want to use for scheduling using --schedule-database=<dbname>." << endl;98 return -1;99 }100 101 97 const char* dbname = conf.Get<string>("schedule-database").c_str(); 102 98
Note:
See TracChangeset
for help on using the changeset viewer.