|
Loading...
|
velocity-user@jakarta.apache.org
[Prev] Thread [Next] | [Prev] Date [Next]
Re: catching #parse errors Will Glass-Husain Thu Mar 18 12:48:59 2004
Hi Claude, Appreciate the vote of support, and good point about the 4 common use cases. I think it'll help developers if we also do the following in conjunction with this patch. (1) include example event handlers in velocity.jar to do common tasks (like relative path loading) (2) allow the event handlers to be configured in velocity.properties instead of in code. I'd be happy to work on item # 1 when and if this patch gets committed. Best, WILL ----- Original Message ----- From: "Claude Brisson" <[EMAIL PROTECTED]> To: "Velocity Users List" <[EMAIL PROTECTED]> Sent: Thursday, March 18, 2004 11:00 AM Subject: Re: catching #parse errors > Will wrote : > > I wrote a patch that lets you modify the behavior of #parse and #include by > > creating special handlers. The committers (hi Geir) have expressed interest > > in this, but it's not clear when it'll be included in the core. > > I'm deeply in favour of including it in the core - I now agree that it is the proper way of doing relative path loading. > Apart from relative loading, security and localization, error handling is now the fourth standard usecase we encounter. > > CloD > > ----- Original Message ----- > From: "Will Glass-Husain" <[EMAIL PROTECTED]> > To: "Velocity Users List" <[EMAIL PROTECTED]> > Sent: Thursday, March 18, 2004 7:37 PM > Subject: Re: catching #parse errors > > > > I wrote a patch that lets you modify the behavior of #parse and #include by > > creating special handlers. The committers (hi Geir) have expressed interest > > in this, but it's not clear when it'll be included in the core. > > > > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342 > > > > After applying this patch could write a handler to return an error page, as > > Geir suggests. > > > > WILL > > > > ----- Original Message ----- > > From: "Geir Magnusson Jr" <[EMAIL PROTECTED]> > > To: "Velocity Users List" <[EMAIL PROTECTED]> > > Sent: Thursday, March 18, 2004 10:25 AM > > Subject: Re: catching #parse errors > > > > > > > > > > On Mar 18, 2004, at 1:05 PM, Mike Curwen wrote: > > > > > > > Is there a way to 'catch' an error that occurs in a #parse'd template, > > > > and then continue on parsing the parent template? > > > > > > > > As an example, I want to have a website composed of little portlets, > > > > that are #parse'd. But if one throws an error, I want that one to have > > > > an error page or message, but still want the rest of the site to > > > > complete parsing. > > > > > > > > This would work if #parse actually invoked the VelocityViewServlet > > > > again, but it appears to all be handled internally by template.merge > > > > > > > > > I think that Will proposed a handler related to that. Either way, it > > > can be done - we'd have to add an event handler so that you could catch > > > the error and return the appropriate output stream when this happens. > > > > > > I assume that would work? > > > > > > -- > > > Geir Magnusson Jr 203-247-1713(m) > > > [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
- catching #parse errors Mike Curwen 2004/03/18
- Re: catching #parse errors Geir Magnusson Jr 2004/03/18
- Re: catching #parse errors Will Glass-Husain 2004/03/18
- Re: catching #parse errors Claude Brisson 2004/03/18
- Re: catching #parse errors Will Glass-Husain 2004/03/18 <=
- Re: catching #parse errors Geir Magnusson Jr 2004/03/18
- input event handler Will Glass-Husain 2004/03/18