cmdopts: Add --interceptor, --extrospector, --actuator and --devicefile
This commit is contained in:
@@ -1,22 +1,31 @@
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
#include <opts.h>
|
||||
#include <mind.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
try {
|
||||
OptionParser options;
|
||||
hk::Mind mind;
|
||||
|
||||
std::cout <<PACKAGE_NAME <<" " <<PACKAGE_VERSION <<std::endl;
|
||||
|
||||
try {
|
||||
std::cout <<PACKAGE_NAME <<" " <<PACKAGE_VERSION <<std::endl;
|
||||
options.parseArguments(argc, argv);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "Exception occurred: " <<e.what() <<std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "Unknown exception occurred" <<std::endl;
|
||||
catch (const std::invalid_argument& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::cerr << options.getUsage() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
options.dumpOptions();
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "Unknown exception occurred" <<std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user