32 lines
559 B
C++
32 lines
559 B
C++
#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 {
|
|
options.parseArguments(argc, argv);
|
|
}
|
|
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;
|
|
}
|