private static Exception failCoercion(final Object object, final Class<?> targetType)
  {
    return new Exception("Could not convert object to " + targetType.getSimpleName() + ". Object is instance of: "
        + object.getClass().getName() + ", value: " + object.toString());
  }
private static Exception failCoercion(final Object object, final Class<?> targetType)
  {
    return new Exception("Could not convert object to " + targetType.getSimpleName() + ". Object is instance of: "
        + object.getClass().getName() + ", value: " + object.toString());
  }
private static Exception failCoercion ( final Object object , final Class < ? > targetType ) { return new Exception ( "Could not convert object to " + targetType . getSimpleName ( ) + ". Object is instance of: " + object . getClass ( ) . getName ( ) + ", value: " + object . toString ( ) ) ; }
Generates a consistent exception that can be used if coercion fails.
Generates a consistent exception that can be used if coercion fails .