velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: Velocity and wrong file name
Date Tue, 20 Feb 2001 17:09:29 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...

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...


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.                     

Developing for the web?  See

View raw message