navid/veins / fea0b82930313d466c8ba11495335c85eaeedca3de6b87ffd7d3a6e7d0e1d9b7 / xveins/src/main.cpp
main.cpp
← xveins/src · 542 bytes · raw · download
#include "cli/cli.h"
#include <exception>
#include <iostream>
#include <string>
#include <vector>
int main(int argc, char** argv) {
std::vector<std::string> args;
args.reserve(static_cast<std::size_t>(argc));
for (int i = 0; i < argc; ++i)
args.emplace_back(argv[i]);
try {
return vn::cli_run(args);
} catch (const std::exception& e) {
std::cout << "error: " << e.what() << "\n";
return 1;
} catch (...) {
std::cout << "error: unexpected failure\n";
return 1;
}
}