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


##########
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:
   Hmm, this can need to be refined if we get 2 different mapper exceptions in 
the stack and avoid this ISE (in particular cause we go 1.3 now).



-- 
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