You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Normand Gagnon <ng...@newtradetech.com> on 2002/06/12 04:29:38 UTC
ParseErrorException not thrown...
Hi,
My Servlet extends the VelocityServet (release 1.2) and I override the method:
error(HttpServletRequest request, HttpServletResponse response, Exception ex)
to create different view depending on the occurring exception for web
designers or programmers.
I noticed that ParseErrorException are not thrown to the VelocityServlet
when occurring in a "three-level" or more level template, that is, a
template that was parsed by another template that was also parsed by
another template. The error log can be found in the Velocity.log but the
VelocityServlet's error method is never call ending up with a blank or
partially parsed template as response.
Exemple:
template:a.vm
------------------------- >
#parse("b.vm")
template:b.vm
--------------------------->
#parse("c.vm")
template:c.vm
---------------------------->
#if( <-- here a syntaxical error
The syntax error found in template "c.vm" will not throw a
"ParseErrorException", I mean, the "ParseErrorException" will not reach
the VelocityServlet.
I also have this problem with the "ResourceNotFoundException" when it
occurs in a two "levels" template.
There are no problems with the "MethodInvokationException".
Thanks in advance,
Normand
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: ParseErrorException not thrown...
Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
Can you
1) try with 1.3-rc1
2) if still present, put in a bug report with bugzilla?
On 6/11/02 10:29 PM, "Normand Gagnon" <ng...@newtradetech.com> wrote:
> Hi,
>
> My Servlet extends the VelocityServet (release 1.2) and I override the method:
>
> error(HttpServletRequest request, HttpServletResponse response, Exception ex)
>
> to create different view depending on the occurring exception for web
> designers or programmers.
>
> I noticed that ParseErrorException are not thrown to the VelocityServlet
> when occurring in a "three-level" or more level template, that is, a
> template that was parsed by another template that was also parsed by
> another template. The error log can be found in the Velocity.log but the
> VelocityServlet's error method is never call ending up with a blank or
> partially parsed template as response.
>
> Exemple:
>
> template:a.vm
> ------------------------- >
> #parse("b.vm")
>
>
> template:b.vm
> --------------------------->
> #parse("c.vm")
>
>
> template:c.vm
> ---------------------------->
> #if( <-- here a syntaxical error
>
>
> The syntax error found in template "c.vm" will not throw a
> "ParseErrorException", I mean, the "ParseErrorException" will not reach
> the VelocityServlet.
>
> I also have this problem with the "ResourceNotFoundException" when it
> occurs in a two "levels" template.
>
> There are no problems with the "MethodInvokationException".
>
> Thanks in advance,
>
> Normand
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>