velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Mora <d_m...@yahoo.com>
Subject Re: API nitpick - no VelocityException
Date Tue, 27 Mar 2001 12:20:41 GMT

About exceptions, is possible add also the name of the
template file when an exception is thrown?
If the template is complex, with nested #parse() can
be difficult find the "line:xx".
Davide

--- "Geir Magnusson Jr." <geirm@optonline.net> wrote:
> Magnus ?or Torfason wrote:
> > 
> > >
> > > "Kyle F. Downey" wrote:
> > > >
> > > > Is there a reason none of the
> org.apache.velocity.exception classes
> > > > inherit from a common base class? Most systems
> I work with do this so
> > > > you can catch any error related to that
> subsystem with one block
> > > > without resorting to catching all Exceptions.
> > >
> > > Cuz I didn't think of it :)
> > >
> > > Good idea.  Will put in there tomorrow post
> release of release candidate
> > > 2 / beta 2.
> > 
> > OK, Geir, now I understand your concerns about
> velocity just throwing
> > Exceptions of the correct type, some time ago.  I
> thought there was a
> > VelocityException that everything inherited from.
> 
> Now there is :)  I put in Kyle's suggestion last
> night.  There is a
> VelocityException that the other three inherit from,
> so you can just
> catch( VelocityException )
> 
> > 
> > You might want to consider copying Rafal's
> TurbineException.  It allows
> > you to encapsulate other exceptions inside the new
> one.  You get the
> > full stack trace for all the exceptions, neatly
> concatenated, and
> > no duplicate text. It is totally awesome.
> 
> Will look.  The only place where we currently wrap
> other exceptions is
> the MethodInvocationException, which is thrown by
> Velocity when a method
> invoked by a reference in a template throws an
> exception.  It does wrap
> the thrown exception so you can dig it out at app
> level, and contains
> the method and reference which 'caused' the problem.
>  I will look at
> TurbineException to see if there is anything else to
> steal.
> 
> thx
> 
> geir
> 
> -- 
> Geir Magnusson Jr.                              
> geirm@optonline.net
> Developing for the web?  See
http://jakarta.apache.org/velocity/


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

Mime
View raw message