Author: rahul
Date: Mon Jul 13 00:10:21 2009
New Revision: 793437
URL: http://svn.apache.org/viewvc?rev=793437&view=rev
Log:
Make coercion exception messages usable.
Modified:
commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/Coercion.java
Modified:
commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/Coercion.java
URL:
http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/Coercion.java?rev=793437&r1=793436&r2=793437&view=diff
==============================================================================
---
commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/Coercion.java
(original)
+++
commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/Coercion.java
Mon Jul 13 00:10:21 2009
@@ -68,7 +68,8 @@
return new Integer(((Number) val).intValue());
}
- throw new Exception("Integer coercion exception");
+ throw new Exception("Integer coercion exception ["
+ + val.getClass().getName() + "]");
}
/**
@@ -95,7 +96,8 @@
return new Long(((Number) val).longValue());
}
- throw new Exception("Long coercion exception");
+ throw new Exception("Long coercion exception ["
+ + val.getClass().getName() + "]");
}
/**
@@ -134,7 +136,8 @@
return new Double(Double.parseDouble(String.valueOf(val)));
}
- throw new Exception("Double coercion exception");
+ throw new Exception("Double coercion exception ["
+ + val.getClass().getName() + "]");
}
/**
@@ -169,7 +172,8 @@
throw new Exception("Boolean->BigDecimal coercion exception");
}
- throw new Exception("BigDecimal coercion exception");
+ throw new Exception("BigDecimal coercion exception ["
+ + val.getClass().getName() + "]");
}
/**
@@ -198,7 +202,8 @@
throw new Exception("Boolean->BigInteger coercion exception");
}
- throw new Exception("BigInteger coercion exception");
+ throw new Exception("BigInteger coercion exception ["
+ + val.getClass().getName() + "]");
}
/**