Files
salmanoff/main.cpp
T

32 lines
559 B
C++
Raw Normal View History

2025-01-04 13:21:33 -04:00
#include <iostream>
#include <exception>
#include <opts.h>
2024-09-04 14:08:50 +10:00
#include <mind.h>
int main(int argc, char **argv)
{
try {
OptionParser options;
hk::Mind mind;
2024-09-05 18:20:33 +10:00
std::cout <<PACKAGE_NAME <<" " <<PACKAGE_VERSION <<std::endl;
2025-01-04 13:21:33 -04:00
try {
options.parseArguments(argc, argv);
2025-01-04 13:21:33 -04:00
}
catch (const std::invalid_argument& e) {
std::cerr << e.what() << std::endl;
std::cerr << options.getUsage() << std::endl;
2025-01-04 13:21:33 -04:00
return EXIT_FAILURE;
}
options.dumpOptions();
}
catch (...) {
std::cerr << "Unknown exception occurred" <<std::endl;
return EXIT_FAILURE;
}
2024-09-04 14:08:50 +10:00
return 0;
}