From: <dr...@us...> - 2003-05-13 05:33:32
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs1:/tmp/cvs-serv9122/src/org/webmacro/util Modified Files: CastUtil.java Log Message: cleanup some error messages that have always confused me Index: CastUtil.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/CastUtil.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CastUtil.java 11 Nov 2002 19:22:38 -0000 1.7 --- CastUtil.java 13 May 2003 05:33:29 -0000 1.8 *************** *** 53,57 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid char: " + o); } } --- 53,57 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid char: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } } *************** *** 85,89 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid byte: " + o); } return v; --- 85,89 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid byte: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return v; *************** *** 98,102 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid short: " + o); } return v; --- 98,102 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid short: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return v; *************** *** 110,114 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid int: " + o); } return i; --- 110,114 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid int: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return i; *************** *** 122,126 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid long: " + o); } return l; --- 122,126 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid long: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return l; *************** *** 134,138 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid float: " + o); } return f; --- 134,138 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid float: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return f; *************** *** 146,150 **** } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid double: " + o); } return d; --- 146,150 ---- } catch (Exception e) { ! throw new IllegalArgumentException("Not a valid double: " + ((o==null) ? "null" : (o.toString() + "; type=" + o.getClass().getName())) ); } return d; |