@@ -474,8 +474,9 @@ public final Object findInjectableValue(Object valueId,
474
474
|| (optional == null && !isEnabled (DeserializationFeature .FAIL_ON_UNKNOWN_INJECT_VALUE ))) {
475
475
return JacksonInject .Value .empty ();
476
476
}
477
- return reportBadDefinition (ClassUtil .classOf (valueId ), String .format (
478
- "No 'injectableValues' configured, cannot inject value with id '%s'" , valueId ));
477
+ throw missingInjectValueException (String .format (
478
+ "No 'injectableValues' configured, cannot inject value with id '%s'" , valueId ),
479
+ valueId , forProperty , beanInstance );
479
480
}
480
481
return _injectableValues .findInjectableValue (valueId , this , forProperty , beanInstance , optional );
481
482
}
@@ -2095,6 +2096,16 @@ public JsonMappingException missingTypeIdException(JavaType baseType,
2095
2096
return InvalidTypeIdException .from (_parser , _colonConcat (msg , extraDesc ), baseType , null );
2096
2097
}
2097
2098
2099
+ /**
2100
+ * @since 2.20
2101
+ */
2102
+ public JsonMappingException missingInjectValueException (String msg ,
2103
+ Object valueId ,
2104
+ BeanProperty forProperty , Object beanInstance ) {
2105
+ return InvalidDefinitionException .from (_parser , msg ,
2106
+ constructType (ClassUtil .classOf (beanInstance )));
2107
+ }
2108
+
2098
2109
/*
2099
2110
/**********************************************************
2100
2111
/* Other internal methods
0 commit comments