tool/main.cpp
changeset 1968 4f682084c643
parent 1961 48f536aefc18
child 2011 04fdb4abf120
equal deleted inserted replaced
1967:c41b4f4af645 1968:4f682084c643
   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();