velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Velocity and wrong file name
Date Tue, 20 Feb 2001 20:36:38 GMT
Magnus ?or Torfason wrote:
> 
> >
> > We can, in Velocity, declare a few of our own exceptions, and throw
> > those.  The thing I was trying to do is to keep it as simple as possible
> > to keep the number of import classes specific to Velocity to a minimum -
> > especially if Turbine is moving towards a 'template engine agnostic'
> > model.  There is not much you can do with really specific information at
> > runtime, I think, and it's logged anyway in the vel runtime log.
> >
> > I guess if that was the case (lots of Velocity-specific exceptions
> > possible) , it can be handled down there in the TurbineVelocityService,
> > and just map to whatever set of exceptions turbine may use internally.
> > It's not clear that Turbine has this kind of support in that the
> > 'template engine agnostic' model may be a figment of my fevered
> > imagination.
> >
> > geir
> 
> I have very good experience with having a specific Exception declared for
> each of my subsystems (comparable to org.apache.velocity.VelocityException
> or something like that).

Now, I realize some of you mistakenly think of Velocity as a Turbine
subsystem... 
 
:)
 
> Classes that wish to communicate specific errors then define INNER classes
> (static) as exceptions, that extend the base Exception.  No imports :)

That's good and clean, but that would be for internal use within and
between your subsystem(s), right?

Here, the problem is how to communicate information out of Velocity
into, in this case, Turbine, but this would apply to any app.

Having a set of simple velocity exceptions to throw up to app code would
help here, but I think we really should resist unless there is no way to
clearly communicate this information upwards...

geir

> Magnus

-- 
Geir Magnusson Jr.                               geirm@optonline.com

Developing for the web?  See http://jakarta.apache.org/velocity/

Mime
View raw message