@@ -2055,7 +2055,8 @@ public <T extends JsonNode> T valueToTree(Object fromValue)
2055
2055
*<p>
2056
2056
* NOTE: since this method does NOT throw exceptions, but internal
2057
2057
* processing may, caller usually has little information as to why
2058
- * serialization would fail.
2058
+ * serialization would fail. If you want access to internal {@link Exception},
2059
+ * call {@link #canSerialize(Class, AtomicReference)} instead.
2059
2060
*
2060
2061
* @return True if mapper can find a serializer for instances of
2061
2062
* given class (potentially serializable), false otherwise (not
@@ -2079,8 +2080,15 @@ public boolean canSerialize(Class<?> type, AtomicReference<Throwable> cause) {
2079
2080
/**
2080
2081
* Method that can be called to check whether mapper thinks
2081
2082
* it could deserialize an Object of given type.
2082
- * Check is done
2083
- * by checking whether a deserializer can be found for the type.
2083
+ * Check is done by checking whether a registered deserializer can
2084
+ * be found or built for the type; if not (either by no mapping being
2085
+ * found, or through an <code>Exception</code> being thrown, false
2086
+ * is returned.
2087
+ *<p>
2088
+ * <b>NOTE</b>: in case an exception is thrown during course of trying
2089
+ * co construct matching deserializer, it will be effectively swallowed.
2090
+ * If you want access to that exception, call
2091
+ * {@link #canDeserialize(JavaType, AtomicReference) instead.
2084
2092
*
2085
2093
* @return True if mapper can find a serializer for instances of
2086
2094
* given class (potentially serializable), false otherwise (not
0 commit comments