diff options
author | Claude Brisson <cbrisson@apache.org> | 2016-08-30 20:56:39 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2016-08-30 20:56:39 +0000 |
commit | 1827f7e44aeaed90f0e832924e3d14908f13da14 (patch) | |
tree | 1bc49f442ee07559a71600e2de2b5fe3dca216a9 /velocity-engine-core/src | |
parent | aad9847231c3a1ba2a5c9b57301190575ba7e1a5 (diff) | |
download | apache-velocity-engine-1827f7e44aeaed90f0e832924e3d14908f13da14.tar.gz |
[engine] do not wrap java.lang.Error in method invocation (fixes VELOCITY-798)
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1758467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src')
-rw-r--r-- | velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java index a9853a2a..3285e429 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java @@ -237,9 +237,16 @@ public class ASTMethod extends SimpleNode private Object handleInvocationException(Object o, InternalContextAdapter context, Throwable t) { /* + * Errors should not be wrapped + */ + if (t instanceof Error) + { + throw (Error)t; + } + /* * We let StopCommands go up to the directive they are for/from */ - if (t instanceof StopCommand) + else if (t instanceof StopCommand) { throw (StopCommand)t; } |