You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Will Glass-Husain <wg...@forio.com> on 2005/12/02 07:39:40 UTC

Exceptions

(changing subject headers)

I'm not worried about serialization issues.  Let me look at 
NestableException.

On a related topic, I'd like to introduce a VelocityRuntimeException that 
plugins can throw to signal application level errors.  For example, an app 
that insists on having 100% correct references can introduce a custom 
Uberspect that throws an error for an invalid reference.  Right now if a 
plugin throws an exception it is caught and logged -- there's no way to 
signal failure to the calling application.  It'd make more sense if the 
engine would let through anything that subclasses VelocityRuntimeException.

WILL

----- Original Message ----- 
From: "Alexey Panchenko" <al...@olmisoft.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Thursday, December 01, 2005 10:17 PM
Subject: Re[4]: svn commit: r350188 - in /jakarta/velocity/core/trunk/src: 
java/org/apache/velocity/exception/ java/org/apache/velocity/runtime/log/ 
java/org/apache/velocity/runtime/resource/loader/ 
java/org/apache/velocity/util/ test/org/apache/velocity/


> Nathan Bubna wrote:
>
>> +1  NestableException is, IMHO, a temporary solution that may have
>> been more reasonable several releases ago, but at this point would
>> just create too much public API churn for what it is worth.
>
> Changing from
>
> VelocityException extends Exception
>
> to
>
> VelocityException extends NestableException
>
> does not change binary compatibility.
>
> Only serializable form is affected, though I do not see a point in
> saving serialized exceptions for long time on disk.
>
> -- 
> Best regards,
> Alexey                            mailto:alex+news@olmisoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Exceptions

Posted by Malcolm Edgar <ma...@gmail.com>.
+1

This is a problem I have been seeing with Click, NPE not being available to
application code

http://issues.apache.org/jira/browse/VELOCITY-424

regards Malcolm Edgar

On 12/2/05, Will Glass-Husain <wg...@forio.com> wrote:
>
> (changing subject headers)
>
> I'm not worried about serialization issues.  Let me look at
> NestableException.
>
> On a related topic, I'd like to introduce a VelocityRuntimeException that
> plugins can throw to signal application level errors.  For example, an app
> that insists on having 100% correct references can introduce a custom
> Uberspect that throws an error for an invalid reference.  Right now if a
> plugin throws an exception it is caught and logged -- there's no way to
> signal failure to the calling application.  It'd make more sense if the
> engine would let through anything that subclasses
> VelocityRuntimeException.
>
> WILL
>
> ----- Original Message -----
> From: "Alexey Panchenko" <al...@olmisoft.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Thursday, December 01, 2005 10:17 PM
> Subject: Re[4]: svn commit: r350188 - in /jakarta/velocity/core/trunk/src:
> java/org/apache/velocity/exception/ java/org/apache/velocity/runtime/log/
> java/org/apache/velocity/runtime/resource/loader/
> java/org/apache/velocity/util/ test/org/apache/velocity/
>
>
> > Nathan Bubna wrote:
> >
> >> +1  NestableException is, IMHO, a temporary solution that may have
> >> been more reasonable several releases ago, but at this point would
> >> just create too much public API churn for what it is worth.
> >
> > Changing from
> >
> > VelocityException extends Exception
> >
> > to
> >
> > VelocityException extends NestableException
> >
> > does not change binary compatibility.
> >
> > Only serializable form is affected, though I do not see a point in
> > saving serialized exceptions for long time on disk.
> >
> > --
> > Best regards,
> > Alexey                            mailto:alex+news@olmisoft.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>