Changeset 10802 for trunk/FACT++
- Timestamp:
- 05/24/11 17:46:30 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/chatclient.cc
r10628 r10802 1 1 #include <boost/filesystem.hpp> 2 2 3 #include "FACT.h"4 3 #include "Configuration.h" 5 4 #include "ChatClient.h" … … 82 81 vm = conf.Parse(argc, argv); 83 82 } 84 catch (std::exception &e) 83 #if BOOST_VERSION > 104000 84 catch (po::multiple_occurrences &e) 85 85 { 86 #if BOOST_VERSION > 104000 87 po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e); 88 if (MO) 89 cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl; 90 else 86 cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl; 87 return -1; 88 } 91 89 #endif 92 cout << "Error: " << e.what() << endl;93 cout << endl;94 90 catch (exception& e) 91 { 92 cerr << "Program options invalid due to: " << e.what() << endl; 95 93 return -1; 96 94 } 97 95 98 if (conf.Has Print())96 if (conf.HasVersion() || conf.HasPrint()) 99 97 return -1; 100 101 if (conf.HasVersion())102 {103 FACT::PrintVersion(argv[0]);104 return -1;105 }106 98 107 99 if (conf.HasHelp()) -
trunk/FACT++/src/chatserv.cc
r10699 r10802 4 4 5 5 #include "Dim.h" 6 #include "FACT.h"7 6 #include "EventImp.h" 8 7 #include "WindowLog.h" … … 87 86 catch (po::multiple_occurrences &e) 88 87 { 89 cout << "Error: " << e.what() << " of '" << e.get_option_name() << "' option." << endl; 90 cout << endl; 88 cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl; 91 89 return -1; 92 90 } 93 91 #endif 94 catch ( std::exception &e)92 catch (exception& e) 95 93 { 96 cout << "Error: " << e.what() << endl; 97 cout << endl; 98 94 cerr << "Program options invalid due to: " << e.what() << endl; 99 95 return -1; 100 96 } 101 97 102 if (conf.Has Print())98 if (conf.HasVersion() || conf.HasPrint()) 103 99 return -1; 104 105 if (conf.HasVersion())106 {107 FACT::PrintVersion(argv[0]);108 return -1;109 }110 100 111 101 if (conf.HasHelp())
Note:
See TracChangeset
for help on using the changeset viewer.