示例#1
0
int main(int argc, char *argv[])
{
	try {
		vector < string > args;
		for (int i = 0; i < argc; ++i) {
			args.push_back(argv[i]);
		}
		App app;
		app.Main(args);
	}
	catch(string s) {
		cout << humantime() << "Error: " << s << endl;
	}
	catch(std::runtime_error s) {
		cout << humantime() << "Runtime error: " << s.what() << endl;
	}
	catch(std::exception s) {
		cout << humantime() << "Exception: " << s.what() << endl;
	}
	catch( ...) {
		cout << humantime() << "Unknown error." << endl;
	}
}
示例#2
0
int main(int, char **)
{
  App app;
  return app.Main();
}