cmdopts: Add --interceptor, --extrospector, --actuator and --devicefile

This commit is contained in:
2025-01-05 13:25:40 -04:00
parent b4e51a0d49
commit 77a19deb8e
4 changed files with 132 additions and 8 deletions
+16 -7
View File
@@ -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;
}