/** * Format a {@link Throwable} as a JSON value. * * Override this method if you want to change how exceptions are rendered in Dev mode. * * @param exception an exception * @return a JSON representation of the passed exception */ protected JsonNode formatDevServerErrorException(Throwable exception) { ArrayNode res = Json.newArray(); for (String s : ExceptionUtils.getStackFrames(exception)) { res.add(s.trim()); } return res; }
/** * Format a {@link Throwable} as a JSON value. * * Override this method if you want to change how exceptions are rendered in Dev mode. * * @param exception an exception * @return a JSON representation of the passed exception */ protected JsonNode formatDevServerErrorException(Throwable exception) { ArrayNode res = Json.newArray(); for (String s : ExceptionUtils.getStackFrames(exception)) { res.add(s.trim()); } return res; }
/** * Format a {@link Throwable} as a JSON value. * * Override this method if you want to change how exceptions are rendered in Dev mode. * * @param exception an exception * @return a JSON representation of the passed exception */ protected JsonNode formatDevServerErrorException(Throwable exception) { ArrayNode res = Json.newArray(); for (String s : ExceptionUtils.getStackFrames(exception)) { res.add(s.trim()); } return res; }