aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
diff options
context:
space:
mode:
Diffstat (limited to 'velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
index ab09f7fd..19730baf 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
@@ -192,7 +192,7 @@ public class Foreach extends Directive
String msg = "Error getting iterator for #foreach parameter "
+ node.literal() + " at " + StringUtils.formatFileString(node);
log.error(msg, ee);
- throw new VelocityException(msg, ee);
+ throw new VelocityException(msg, ee, rsvc.getLogContext().getStackTrace());
}
if (i == null && !skipInvalidIterator)
@@ -201,7 +201,7 @@ public class Foreach extends Directive
+ StringUtils.formatFileString(node) + " is of type " + iterable.getClass().getName()
+ " and cannot be iterated by " + rsvc.getUberspect().getClass().getName();
log.error(msg);
- throw new VelocityException(msg);
+ throw new VelocityException(msg, null, rsvc.getLogContext().getStackTrace());
}
}
return i;