We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please see my pull request #832.
The text was updated successfully, but these errors were encountered:
Just in case it can help anyone, I workaround this limitation by registering a new include tag that ignores the exception:
include
private static class IncludeTag extends com.hubspot.jinjava.lib.tag.IncludeTag implements Tag { @Override public String interpret(TagNode tagNode, JinjavaInterpreter interpreter) { try { return super.interpret(tagNode,interpreter); } catch (InterpretException e) { if ( ignoreMissing(tagNode) && e.getCause() instanceof com.hubspot.jinjava.loader.ResourceNotFoundException) { return ""; } throw e; } } private boolean ignoreMissing(TagNode tagNode) { HelperStringTokenizer helper = new HelperStringTokenizer(tagNode.getHelpers()); List<String> all = helper.allTokens(); return (all.contains("ignore") && all.indexOf("missing") == all.indexOf("ignore") + 1); } }
Sorry, something went wrong.
No branches or pull requests
Please see my pull request #832.
The text was updated successfully, but these errors were encountered: