velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Velocity and wrong file name
Date Mon, 26 Feb 2001 06:06:19 GMT
Ok, all is in for the addition we talked about for two new exceptions to
be thrown by Runtime.getTemplate() :

They are nothing fancy, but help you distinguish between the two
fundamental errors when dealing with templates ( not finding them and
syntax errors) and deal with them at app level.

So the deal is, wherever you call getTemplate() you can figure out what
is going on :

  outty =  getTemplate("sample.vm");
catch( ParseErrorException pee )
catch( ResourceNotFoundException rnfe )
catch( Exception e )
  // when things get ugly internally

I think I got it all right.  I tested a bit (imagine...).

Will document when the docs get checked in in Anakia form.


Geir Magnusson Jr.                     
Developing for the web?  See

View raw message