tool/main.cpp
changeset 2011 04fdb4abf120
parent 2010 87de63b19e4c
parent 1968 4f682084c643
child 2436 960cc1bb6b4a
child 2589 2b9c78543663
equal deleted inserted replaced
2010:87de63b19e4c 2011:04fdb4abf120
   310                     cmd->setOutputFile(outputFile);
   310                     cmd->setOutputFile(outputFile);
   311                     cmd->setForce(force);
   311                     cmd->setForce(force);
   312                     cmd->execute(commandArgs);
   312                     cmd->execute(commandArgs);
   313                 } catch (InvalidUsageException &e) {
   313                 } catch (InvalidUsageException &e) {
   314                     cerr << e.what() << endl << endl;
   314                     cerr << e.what() << endl << endl;
   315                     cerr << binaryBaseName << " " << cmd->helpString();
   315                     cerr << cmd->helpString(binaryBaseName);
   316                     retval = 1;
   316                     retval = 1;
   317                 } catch (CommandException &e) {
   317                 } catch (CommandException &e) {
   318                     cerr << e.what() << endl;
   318                     cerr << e.what() << endl;
   319                     retval = 1;
   319                     retval = 1;
   320                 } catch (MasterDeviceException &e) {
   320                 } catch (MasterDeviceException &e) {
   321                     cerr << e.what() << endl;
   321                     cerr << e.what() << endl;
   322                     retval = 1;
   322                     retval = 1;
   323                 }
   323                 }
   324             } else {
   324             } else {
   325                 cout << binaryBaseName << " " << cmd->helpString();
   325                 cout << cmd->helpString(binaryBaseName);
   326             }
   326             }
   327         } else {
   327         } else {
   328             cerr << "Ambiguous command abbreviation! Matching:" << endl;
   328             cerr << "Ambiguous command abbreviation! Matching:" << endl;
   329             for (ci = matchingCommands.begin();
   329             for (ci = matchingCommands.begin();
   330                     ci != matchingCommands.end();
   330                     ci != matchingCommands.end();