/** * @since 2.9 */ public static <T> T throwAsMappingException(DeserializationContext ctxt, IOException e0) throws JsonMappingException { if (e0 instanceof JsonMappingException) { throw (JsonMappingException) e0; } JsonMappingException e = JsonMappingException.from(ctxt, e0.getMessage()); e.initCause(e0); throw e; }
@SuppressWarnings("unchecked") protected <T> T _handleDateTimeException(DeserializationContext ctxt, Class<?> type, DateTimeException e0, String value) throws IOException { try { return (T) ctxt.handleWeirdKey(type, value, "Failed to deserialize %s: (%s) %s", type.getName(), e0.getClass().getName(), e0.getMessage()); } catch (JsonMappingException e) { e.initCause(e0); throw e; } catch (IOException e) { if (null == e.getCause()) { e.initCause(e0); } throw JsonMappingException.fromUnexpectedIOE(e); } } }
@SuppressWarnings("unchecked") protected <R> R _handleDateTimeException(DeserializationContext context, DateTimeException e0, String value) throws JsonMappingException { try { return (R) context.handleWeirdStringValue(handledType(), value, "Failed to deserialize %s: (%s) %s", handledType().getName(), e0.getClass().getName(), e0.getMessage()); } catch (JsonMappingException e) { e.initCause(e0); throw e; } catch (IOException e) { if (null == e.getCause()) { e.initCause(e0); } throw JsonMappingException.fromUnexpectedIOE(e); } }
e.initCause(cause); throw e;
/** * @since 2.9 */ public static <T> T throwAsMappingException(DeserializationContext ctxt, IOException e0) throws JsonMappingException { if (e0 instanceof JsonMappingException) { throw (JsonMappingException) e0; } JsonMappingException e = JsonMappingException.from(ctxt, e0.getMessage()); e.initCause(e0); throw e; }
protected <T> T _rethrowDateTimeException(DeserializationContext ctxt, Class<?> type, DateTimeException e0, String value) throws IOException { JsonMappingException e; if (e0 instanceof DateTimeParseException) { e = ctxt.weirdStringException(value, type, e0.getMessage()); e.initCause(e0); } else { e = JsonMappingException.from(ctxt, String.format("Failed to deserialize %s: (%s) %s", type.getName(), e0.getClass().getName(), e0.getMessage()), e0); } throw e; } }
protected <T> T _rethrowDateTimeException(DeserializationContext ctxt, Class<?> type, DateTimeException e0, String value) throws IOException { JsonMappingException e; if (e0 instanceof DateTimeParseException) { e = ctxt.weirdStringException(value, type, e0.getMessage()); e.initCause(e0); } else { e = JsonMappingException.from(ctxt, String.format("Failed to deserialize %s: (%s) %s", type.getName(), e0.getClass().getName(), e0.getMessage()), e0); } throw e; } }
protected <BOGUS> BOGUS _rethrowDateTimeException(JsonParser p, DeserializationContext context, DateTimeException e0, String value) throws JsonMappingException { JsonMappingException e; if (e0 instanceof DateTimeParseException) { e = context.weirdStringException(value, handledType(), e0.getMessage()); e.initCause(e0); } else { e = JsonMappingException.from(p, String.format("Failed to deserialize %s: (%s) %s", handledType().getName(), e0.getClass().getName(), e0.getMessage()), e0); } throw e; }
protected <BOGUS> BOGUS _rethrowDateTimeException(JsonParser p, DeserializationContext context, DateTimeException e0, String value) throws JsonMappingException { JsonMappingException e; if (e0 instanceof DateTimeParseException) { e = context.weirdStringException(value, handledType(), e0.getMessage()); e.initCause(e0); } else { e = JsonMappingException.from(p, String.format("Failed to deserialize %s: (%s) %s", handledType().getName(), e0.getClass().getName(), e0.getMessage()), e0); } throw e; }
e.initCause(cause);
e.initCause(cause); throw e;