velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Guidetti <herve.guide...@idbsoft.ch>
Subject Re: Velocity and wrong file name
Date Tue, 20 Feb 2001 16:30:31 GMT

> I checked in a tiny fix - just threw an exception in Template.merge()
> when we didn't have an AST.   It's the same message as what is logged.
>
> We might want to split this into two kinds of exceptions, one for
> 'ResourceNotFound' and the other for 'ParseError', but it may really not
> add much value...
>

Not sure...
I have a multilanguage system. If a file doesn't exist, i use another file
(default language).
So it is important if the file exist and has error or if the file doesn't
exist.


> I saw in a Turbine list thread that Turbine will handle a thrown
> exception just fine.  (That was one of the concerns about doing this...)
>
> Since this didn't change the signature of the method, this shouldn't
> hurt anyone, because merge() is in a try/catch anyway.
>
> See if this makes anyone happy...
>
> geir
>
>
> Hervé Guidetti wrote:
> >
> > Hi,
> >
> > I use Velocity  via the TurbineVelocity service.
> > I call :
> > handleRequest(context, filename, bytes);
> >
> > But if the filename is wrong (the file doesn't exist) the bytes array
> > (bytes) is empty and no exception is thrown.
> > Is that normal ?
> > I'd except an exception ?
> > It seems logical to get an exception. Isn't it ??
> > Is that a bug ?
> >
> > Thanks.
> >
> > Hervé Guidetti
>
> --
> Geir Magnusson Jr.                               geirm@optonline.com
>
> Developing for the web?  See http://jakarta.apache.org/velocity
>


Mime
View raw message