dblevins commented on code in PR #91:
URL: https://github.com/apache/johnzon/pull/91#discussion_r873230118


##########
johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MappingParserImpl.java:
##########
@@ -373,11 +377,20 @@ private Object buildObject(final Type inType, final 
JsonObject object, final boo
         }
 
         Object t;
-        if (classMapping.factory.getParameterTypes() == null || 
classMapping.factory.getParameterTypes().length == 0) {
-            t = classMapping.factory.create(null);
-        } else {
-            t = classMapping.factory.create(createParameters(classMapping, 
object, jsonPointer));
+        try {
+            if (classMapping.factory.getParameterTypes() == null || 
classMapping.factory.getParameterTypes().length == 0) {
+                t = classMapping.factory.create(null);
+            } else {
+                t = classMapping.factory.create(createParameters(classMapping, 
object, jsonPointer));
+            }
+        } catch (Exception e) {
+            final String message = String.format("%s cannot be constructed to 
deserialize %s: %s%n%s",

Review Comment:
   Pushed something that should prevent us from doing this wrapping more than 
once



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to