Jinja2 extension adding {% try %} {% catch %} exception handling blocks. Version 0.1.1, requires Python >=3.7. Low release cadence, maintained as needed.
pip install jinja-try-catchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiate Jinja2 Environment with TryExtension; use {% try %}...{% catch %}...{% endtry %} blocks. Within catch block, `error` variable holds the exception message.
Only access `{{ error }}` within the {% catch %} block.Continue using `TryExtension` class; no current deprecation but be aware of potential API changes.
Use conditional logic inside catch block if needed: `{% catch %}{% if 'specific' in error %}...{% endif %}{% endtry %}`.