Re: outputting mysql (or any other database) error in jsp

2004-07-17 Thread Research labs
Quite exhaustive, thanks. I did not notice the inherited _getMessage()_; thanks for bringing it to my attention. This is exactly what I need. Ola. --- Brett Connor <[EMAIL PROTECTED]> wrote: > The exception will contain a message via the > inherited _getMessage()_ > etc, if it's just display

Re: outputting mysql (or any other database) error in jsp

2004-07-17 Thread Brett Connor
The exception will contain a message via the inherited _getMessage()_ etc, if it's just display purposes you're looking for this may be enough, except for localization issues. Beyond that, if you want to get a correctly localized message or make some useful interpretation of the error code to p

RE: outputting mysql (or any other database) error in jsp

2004-07-17 Thread Research labs
Thanks for your prompt response. As you are aware, getErrorCode() method of SQLException returns the vendor specific SQL error code, but there is no getErrorMessage() method. Since this is the case, how can I get the actual error message if I implement according to your suggestion? Please do you

RE: outputting mysql (or any other database) error in jsp

2004-07-17 Thread Robert Taylor
One strategy is to wrap the SQLException thrown by mySQL in a meaningful ApplicationException which can be caught in your action class or declarative exception handling mechanism and "interpretted" into the appropriate client error message which can be placed in the appropriate scope (request or se