public static JsonException fromJackson(JsonMappingException e) { Throwable rootCause = getRootCause(e); String message = rootCause.getMessage(); if (rootCause instanceof PatternSyntaxException) { PatternSyntaxException patternSyntaxException = (PatternSyntaxException) rootCause; message = patternSyntaxException.getMessage(); } else if (rootCause instanceof JsonMappingException) { message = ((JsonMappingException) rootCause).getOriginalMessage(); } else if (rootCause instanceof InvalidInputException) { message = ((InvalidInputException) rootCause).getErrors().first().getDetail(); } List<String> nodes = transform(e.getPath(), TO_NODE_NAMES); String pointer = '/' + Joiner.on('/').join(nodes); return new JsonException(Errors.single(10, pointer, "Error parsing JSON", message)); }
message = (exception.getOriginalMessage() + ". " + ((PropertyBindingException) exception).getMessageSuffix()).trim(); } else { message = exception.getOriginalMessage();
field = e.getPath().get(0).getFieldName(); throw new GenericRestException(BAD_REQUEST, "error_json_structure_invalid", line, column, field, e.getOriginalMessage()); } catch (JsonParseException e) { String msg = e.getOriginalMessage();
} catch (JsonMappingException e) { throw new ProcessingException(new ProcessingMessage() .setMessage(e.getOriginalMessage()).put("uri", uri)); } catch (JsonParseException e) { throw new ProcessingException(new ProcessingMessage()
} catch (JsonMappingException e) { throw new ProcessingException(new ProcessingMessage() .setMessage(e.getOriginalMessage()).put("uri", uri)); } catch (JsonParseException e) { throw new ProcessingException(new ProcessingMessage()
} catch (JsonMappingException e) { throw new ProcessingException(new ProcessingMessage() .setMessage(e.getOriginalMessage()).put("uri", uri)); } catch (JsonParseException e) { throw new ProcessingException(new ProcessingMessage()