Skip to content

Commit

Permalink
catch generic exception in catch_jinja and reraise as CompilationError
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Dec 1, 2024
1 parent fcce305 commit 47dc9f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt_common/clients/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,8 @@ def catch_jinja(node: Optional[_NodeProtocol] = None) -> Iterator[None]:
except CompilationError as exc:
exc.add_node(node)
raise
except Exception as e:
raise CompilationError(str(e), node) from e


_TESTING_PARSE_CACHE: Dict[str, jinja2.nodes.Template] = {}
Expand Down

0 comments on commit 47dc9f4

Please sign in to comment.