Skip to content

Commit

Permalink
Add a utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 9, 2015
1 parent e2abd06 commit 5dfc92c
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -863,6 +863,17 @@ public JsonMappingException mappingException(Class<?> targetClass, JsonToken tok
public JsonMappingException mappingException(String message) {
return JsonMappingException.from(getParser(), message);
}

/**
* Helper method for constructing generic mapping exception with specified
* message and current location information
*
* @since 2.6
*/
public JsonMappingException mappingException(String msgTemplate, Object... args) {
String message = String.format(msgTemplate, args);
return JsonMappingException.from(getParser(), message);
}

/**
* Helper method for constructing instantiation exception for specified type,
Expand Down

0 comments on commit 5dfc92c

Please sign in to comment.