Re: Mistake in SimpleORM code

[email protected] Mon, 14 Sep 2009 17:45:48 +1000
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Hello Andre,

Yes, should read " to double ".  Fixed in subversion.  You are reading carefully to find that!

Note that exceptions generally include useful information, such as the filed and bad value in this case.

Please post issues to the mailing list.

Anthony

At 11:41 PM 13/09/2009, you wrote:
>I was looking the SimpleORM's code and found something weird:
>File: SimpleORM_Root_Folder/dataset/SRecordGeneric.java, line 113.
>
>public float getFloat(String field) {
>        Object val = this.get(field);
>        try {
>            return convertToFloat(val);
>        }
>        catch (NumberFormatException e) {
>            throw new SException.Data("Could not convert " + field + " to long " + val, e); <--- line 113
>            //.setFieldMeta(field).setRecordInstance(this).setParams(val);
>        }
>    }
>
>the exception on getFloat method should be "to float" not "to long".

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/