} catch (BatfishException e) { return Response.status(Status.BAD_REQUEST) .entity(e.getMessage()) .type(MediaType.TEXT_PLAIN) .build();
boolean processCommand(String[] words, @Nullable FileWriter outWriter) { Command command; try { command = Command.fromName(words[0]); } catch (BatfishException e) { _logger.errorf("Command failed: %s\n", e.getMessage()); return false; } List<String> options = getCommandOptions(words); List<String> parameters = getCommandParameters(words, options.size()); try (ActiveSpan span = GlobalTracer.get().buildSpan(command.commandName()).startActive()) { assert span != null; // make span not show up as unused. return processCommand(command, words, outWriter, options, parameters); } catch (Exception e) { e.printStackTrace(); return false; } }
+ getFullText(ctx) + " : " + e.getMessage()); _currentInterfaces = ImmutableList.of(); return;
throw new BatfishException("Failed to convert unmodified question string to JSON", e); } catch (BatfishException e) { _logger.errorf("Could not construct a question: %s\n", e.getMessage()); return false;
containerName, testrigName, stackTrace); batfish.setTerminatingExceptionMessage( e.getClass().getName() + ": " + e.getMessage()); answer = new Answer(); answer.setStatus(AnswerStatus.FAILURE);
+ getFullText(ctx) + " : " + e.getMessage()); _currentInterfaces = ImmutableList.of(); return;