/**
  * Helper method for constructing exception to indicate that given type id (parsed from JSON)
  * could not be converted to a Java type.
  */
 public JsonMappingException unknownTypeException(JavaType type, String id) {
   return JsonMappingException.from(
       _parser, "Could not resolve type id '" + id + "' into a subtype of " + type);
 }
 public JsonMappingException endOfInputException(Class<?> instClass) {
   return JsonMappingException.from(
       _parser, "Unexpected end-of-input when trying to deserialize a " + instClass.getName());
 }
 public JsonMappingException instantiationException(Class<?> instClass, String msg) {
   return JsonMappingException.from(
       _parser, "Can not construct instance of " + instClass.getName() + ", problem: " + msg);
 }
 /**
  * Helper method for constructing instantiation exception for specified type, to indicate problem
  * with physically constructing instance of specified class (missing constructor, exception from
  * constructor)
  */
 public JsonMappingException instantiationException(Class<?> instClass, Throwable t) {
   return JsonMappingException.from(
       _parser,
       "Can not construct instance of " + instClass.getName() + ", problem: " + t.getMessage(),
       t);
 }
 /**
  * Helper method for constructing generic mapping exception with specified message and current
  * location information
  */
 public JsonMappingException mappingException(String message) {
   return JsonMappingException.from(getParser(), message);
 }
 public JsonMappingException mappingException(Class<?> targetClass, JsonToken token) {
   String clsName = _calcName(targetClass);
   return JsonMappingException.from(
       _parser, "Can not deserialize instance of " + clsName + " out of " + token + " token");
 }
 /** Helper method for indicating that the current token was expected to be another token. */
 public JsonMappingException wrongTokenException(JsonParser jp, JsonToken expToken, String msg) {
   return JsonMappingException.from(
       jp, "Unexpected token (" + jp.getCurrentToken() + "), expected " + expToken + ": " + msg);
 }