[various] Improve documentation

Output file must be preallocated.
This commit is contained in:
Joe Thornber
2016-07-11 14:53:03 +01:00
parent ceffa5f5c4
commit 4779fb9b80
16 changed files with 127 additions and 13 deletions

View File

@@ -61,8 +61,14 @@ application::run(int argc, char **argv)
std::list<command::ptr>::const_iterator it;
for (it = cmds_.begin(); it != cmds_.end(); ++it) {
if (cmd == (*it)->get_name())
return (*it)->run(argc, argv);
if (cmd == (*it)->get_name()) {
try {
return (*it)->run(argc, argv);
} catch (std::exception const &e) {
cerr << e.what() << "\n";
return 1;
}
}
}
std::cerr << "Unknown command '" << cmd << "'\n";