View Single Post
  #11 (permalink)  
Old 05-25-2008, 06:00 PM
rjuyal's Avatar
rjuyal rjuyal is offline
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
Quote:
'm using Spring DAO
If you mean Spring Framework, then

In your DaoImpl, throw the SQLException, pass it to controller via Model ( i guess you have done this already ). In controller catch the SQLexception. use
Code:
errors.reject ( "DB Error", new Object[] { new Integer ( sqlException.getErrorCode() ) , sqlException.getCause().getMessage()}, "DB Error: {0} : {1}" );
you can set this in your messages.properties also.
__________________
i am the future
Reply With Quote