Returns 100 error code for a true "error", otherwise returns the number of tests that failed. Otherwise, very similar to the parent runTool method. @param cli the command line object @return 0 on success, or a number corresponding to number of tests that failed, or 100 for an Error @throws Exce
(CommandLine cli)
| 176 | * @throws Exception if a tool failed, e.g. authentication failure |
| 177 | */ |
| 178 | @Override |
| 179 | public int runTool(CommandLine cli) throws Exception { |
| 180 | int toolExitStatus; |
| 181 | try { |
| 182 | toolExitStatus = runAssert(cli); |
| 183 | } catch (Exception exc) { |
| 184 | // since this is a CLI, spare the user the stacktrace |
| 185 | String excMsg = exc.getMessage(); |
| 186 | if (excMsg != null) { |
| 187 | if (isVerbose()) { |
| 188 | CLIO.err("\nERROR: " + exc + "\n"); |
| 189 | } else { |
| 190 | CLIO.err("\nERROR: " + excMsg + "\n"); |
| 191 | } |
| 192 | toolExitStatus = 100; // Exit >= 100 means error, else means number of tests that failed |
| 193 | } else { |
| 194 | throw exc; |
| 195 | } |
| 196 | } |
| 197 | return toolExitStatus; |
| 198 | } |
| 199 | |
| 200 | @Override |
| 201 | public void runImpl(CommandLine cli) throws Exception { |
nothing calls this directly
no test coverage detected