Letractively / jcatapult

Automatically exported from code.google.com/p/jcatapult
0 stars 0 forks source link

Throw ConverterStateException with the same message when code="" as when code==null. #112

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Post an HTML form with  <input name="amount@currencyCode" value=""
type="hidden">.

What is the expected output? What do you see instead?
Expected:
"ConverterStateException: You must provide the currencyCode dynamic
attribute. If you are using a text field it will look like this: [@jc.text
_currencyCode="USD"]"

Seen:
"ConverterStateException: Invalid currencyCode []"

What version of the product are you using? On what operating system?
jcatapult-mvc-1.0-RC13

Please provide any additional information below.
The value="" in the HTML form causes "ConverterStateException: Invalid
currencyCode []" to be thrown.  Having value="USD" would work.  Having
value="garbage" would throw "ConverterStateException: You must provide the
currencyCode dynamic attribute. If you are using a text field it will look
like this: [@jc.text _currencyCode="USD"]".  That verbose message should be
thrown when value="" in addition to when value="garbage".

Original issue reported on code.google.com by chadwick...@gmail.com on 6 May 2009 at 9:10

Attachments:

GoogleCodeExporter commented 8 years ago
I fixed this and also added some better error messaging for truly invalid 
currency codes.

Original comment by bpontare...@gmail.com on 11 May 2009 at 11:26