Skip to content

Commit aef9cdf

Browse files
committed
1 parent 15f9437 commit aef9cdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ public JsonMappingException(Closeable processor, String msg) {
251251
public JsonMappingException(Closeable processor, String msg, Throwable problem) {
252252
super(msg, problem);
253253
_processor = processor;
254-
if (processor instanceof JsonParser) {
254+
if (problem instanceof JsonProcessingException) {
255+
_location = ((JsonProcessingException) problem).getLocation();
256+
} else if (processor instanceof JsonParser) {
255257
_location = ((JsonParser) processor).getTokenLocation();
256258
}
257259
}

0 commit comments

Comments
 (0)