[SOLVED] setAttribute in VORowImpl is not throwing JBO Exceptions
414687Mar 21 2007 — edited May 3 2007I have some view attributes that are defined as oracle.jbo.domain.Number or oracle.jbo.domain.Date. When I key in all alphas (not numbers), I was expecting to get a DataCreationException from the ViewRowImpl.setAttribute. However, I am getting NumberFormatException for the number attributes and IllegalArgumentException for the Date attributes.
This is a problem, because I cannot customize these messages as when they are thrown, because they are not associated with an attribute. Since they are Java Exceptions, these exceptions are treated like Global uncatchable exceptions. I obviously want to customize these message so the user gets a better message.
I had code that catched the exceptions in the setAttribute(int i, Object object) method of the ViewRowImpl and it worked in the BC4J tester. However, the BC4J tester does not bundle the exceptions as is performed when using the Embedded OC4J server using JSPs. So, this logic to catch the exceptions were never caught because they were bundled.
Does anyone have any tips or ideas on how to customize these errors or catch them in a better fashion? I would greatly prefer to get an exception that extends JboException as I already have logic in place to customize these messages.
Thanks for any responses you can give.
Shay
Message was edited by:
shay.vankeirsbilck@gsa.gov