Skip to content

Commit

Permalink
Exception message improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 1, 2024
1 parent c3d22c4 commit 5c9b032
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,11 @@ private final void _verifySetter() throws IOException {
// since 2.9
private void _reportMissingSetter(JsonParser p, DeserializationContext ctxt) throws IOException
{
final String msg = "No fallback setter/field defined for creator property "+ClassUtil.name(getName());
String clsDesc = (_annotated == null) ? "UNKNOWN TYPE"
: ClassUtil.getClassDescription(_annotated.getOwner().getDeclaringClass());
final String msg = String.format(
"No fallback setter/field defined for creator property %s (of %s)",
ClassUtil.name(getName()), clsDesc);
// Hmmmh. Should we return quietly (NOP), or error?
// Perhaps better to throw an exception, since it's generally an error.
if (ctxt != null ) {
Expand Down

0 comments on commit 5c9b032

Please sign in to comment.