tool/main.cpp
changeset 2004 be807e224b0e
parent 1968 4f682084c643
child 2011 04fdb4abf120
equal deleted inserted replaced
2003:a7ff6c28a432 2004:be807e224b0e
   338                     cmd->setOutputFile(outputFile);
   338                     cmd->setOutputFile(outputFile);
   339                     cmd->setForce(force);
   339                     cmd->setForce(force);
   340                     cmd->execute(commandArgs);
   340                     cmd->execute(commandArgs);
   341                 } catch (InvalidUsageException &e) {
   341                 } catch (InvalidUsageException &e) {
   342                     cerr << e.what() << endl << endl;
   342                     cerr << e.what() << endl << endl;
   343                     cerr << binaryBaseName << " " << cmd->helpString();
   343                     cerr << cmd->helpString(binaryBaseName);
   344                     retval = 1;
   344                     retval = 1;
   345                 } catch (CommandException &e) {
   345                 } catch (CommandException &e) {
   346                     cerr << e.what() << endl;
   346                     cerr << e.what() << endl;
   347                     retval = 1;
   347                     retval = 1;
   348                 } catch (MasterDeviceException &e) {
   348                 } catch (MasterDeviceException &e) {
   349                     cerr << e.what() << endl;
   349                     cerr << e.what() << endl;
   350                     retval = 1;
   350                     retval = 1;
   351                 }
   351                 }
   352             } else {
   352             } else {
   353                 cout << binaryBaseName << " " << cmd->helpString();
   353                 cout << cmd->helpString(binaryBaseName);
   354             }
   354             }
   355         } else {
   355         } else {
   356             cerr << "Ambiguous command abbreviation! Matching:" << endl;
   356             cerr << "Ambiguous command abbreviation! Matching:" << endl;
   357             for (ci = matchingCommands.begin();
   357             for (ci = matchingCommands.begin();
   358                     ci != matchingCommands.end();
   358                     ci != matchingCommands.end();