We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1890f93 + 5c2f604 commit d9933c3Copy full SHA for d9933c3
1 file changed
src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java
@@ -654,6 +654,12 @@ public TemplateError removeError(int index) {
654
return errors.remove(index);
655
}
656
657
+ public Optional<TemplateError> getLastError() {
658
+ return errors.isEmpty()
659
+ ? Optional.empty()
660
+ : Optional.of(errors.get(errors.size() - 1));
661
+ }
662
+
663
public int getScopeDepth() {
664
return scopeDepth;
665
0 commit comments