ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Where to catch DaoException?
Date Wed, 16 Feb 2005 18:25:50 GMT
I only catch exception if i need to clean something up or if i can
recover from it. Otherwise, let em rip. Between my Presentation layer
and my service layer i throw RuntimeExceptions. I do logging of
exceptions at the highest point of my application. If i wanted to
provide a pretty screen for clients instead of a stack trace i'd use
the struts layer to catch and log the exception then give the user a
kinder gentler error message. You can also use tomcat to accomplish
that.

Brandon


On Wed, 16 Feb 2005 11:39:27 -0600, friendVU admin
<maillist@friendvu.com> wrote:
> 
> In Struts.... I would catch the action where it happens and keep
> rethrowing it to the container.
> This way web.xml error page can display a nicley formated message.
> 
> .V
> 
> Nathan Maves wrote:
> 
> > Just curious what the best practices about this are.  And since the
> > DaoExcpetion is now a runtime you have to explicitly put your try {}
> > catch {} blocks somewhere right :)
> >
> >
> > Here is my setup
> >
> > Struts Actions (Presentation)
> > Service Layer (Business Logic) I assume here :)
> > Dao layer    (Data Access Layer)
> >
> >
> > Nathan
> >
> >
> >
> 
>

Mime
View raw message