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(); |