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 19:39:58 GMT
Paulo Gaspar wrote:
> 
> Hi again Geir,
> 
> Option 1) does not sound so bat to me:
>  - If Turbine does not know the "ParseException" it can just deal with
>    it as it would with a generic Exception;
>  - Wouldn't then be simple to improve whatever wrappers Turbine has for
>    Velocity with this more specific exception?
> 

The point is to provide enough information such that Turbine (and anyone
else) can figure out if the problem in a merge is file-ish or parse-ish
at runtime (w/o having to peek at the log) as the application, if
file-ish, may make another attempt and try a different file (the example
given was localized sets of templates...)

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



> Have fun,
> Paulo
> 
> > -----Original Message-----
> > From: gmj@mta8.srv.hcvlny.cv.net [mailto:gmj@mta8.srv.hcvlny.cv.net]On
> > Behalf Of Geir Magnusson Jr.
> >
> > ...
> >
> > The issues I see :
> >
> > 1) If we through something like a org.apache.velocity.XXX.ParseException
> > to indicate a parser exception, would this muddle up anything in Turbine
> > as you now have to import velocity specific things into 'upper' layers
> > of your code?  I really don't like this.
> >
> > ...
> >
> > geir
> >
> > --
> > Geir Magnusson Jr.                               geirm@optonline.com

-- 
Geir Magnusson Jr.                               geirm@optonline.com

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

Mime
View raw message