/** * @since 2.7 */ protected JsonMappingException wrapAsJsonMappingException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: Only avoid wrapping if already a JsonMappingException if (t instanceof JsonMappingException) { return (JsonMappingException) t; } return ctxt.instantiationException(getValueClass(), t); }
/** * @since 2.7 */ protected JsonMappingException unwrapAndWrapException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: This used to always unwrap the whole exception, but now only // does so if and until `JsonMappingException` is found. for (Throwable curr = t; curr != null; curr = curr.getCause()) { if (curr instanceof JsonMappingException) { return (JsonMappingException) curr; } } return ctxt.instantiationException(getValueClass(), t); }
/** * @since 2.7 */ protected JsonMappingException wrapAsJsonMappingException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: Only avoid wrapping if already a JsonMappingException if (t instanceof JsonMappingException) { return (JsonMappingException) t; } return ctxt.instantiationException(getValueClass(), t); }
/** * @since 2.7 */ protected JsonMappingException wrapAsJsonMappingException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: Only avoid wrapping if already a JsonMappingException if (t instanceof JsonMappingException) { return (JsonMappingException) t; } return ctxt.instantiationException(getValueClass(), t); }
/** * @since 2.7 */ protected JsonMappingException unwrapAndWrapException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: This used to always unwrap the whole exception, but now only // does so if and until `JsonMappingException` is found. for (Throwable curr = t; curr != null; curr = curr.getCause()) { if (curr instanceof JsonMappingException) { return (JsonMappingException) curr; } } return ctxt.instantiationException(getValueClass(), t); }
/** * @since 2.7 */ protected JsonMappingException unwrapAndWrapException(DeserializationContext ctxt, Throwable t) { // 05-Nov-2015, tatu: This used to always unwrap the whole exception, but now only // does so if and until `JsonMappingException` is found. for (Throwable curr = t; curr != null; curr = curr.getCause()) { if (curr instanceof JsonMappingException) { return (JsonMappingException) curr; } } return ctxt.instantiationException(getValueClass(), t); }