ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: Exception error message
Date Mon, 27 Feb 2006 22:06:22 GMT

Letting an exception trickle all the way to your user is generally a  
bad thing.  If it was me I would catch this exception and then pull  
the error message from some where else, say a resources file, and the  
display this to the user.

I have no clue what web framework you are using, if any, but this  
kind of thing is handled in the Action classes of the Struts framework.

On Feb 27, 2006, at 2:18 PM, Chiu, Dennis (Toronto - BCE) wrote:

> Hi there:
> When I display the getMessage() of the SQLException on the front- 
> end screen it looks like the following:
> java.rmi.RemoteException:
> --- The error occurred in Abc.xml.
> --- The error occurred while applying a parameter map.
> --- Check the Abc.Abc_Param.
> --- Check the statement (update procedure failed).
> --- Cause: com.sybase.jdbc2.jdbc.SybSQLException: The entry you are  
> trying to save has been modified by another user, please refresh
> Since Ibatis will automatically append some description in front of  
> the message of the original SQLException.
> Is there any ways to suppress those added description?
> The user just need to see the "Raise Error message" from the db.
> Many Thx!
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dennis Chiu
> e-mail: dennis_chiu@ml.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> If you are not an intended recipient of this e-mail, please notify  
> the sender, delete it and do not read, act upon, print, disclose,  
> copy, retain or redistribute it. Click here for important  
> additional terms relating to this e-mail.     http://www.ml.com/ 
> email_terms/

View raw message