diff --git a/dbt_common/clients/jinja.py b/dbt_common/clients/jinja.py index 2cee922..cb136a3 100644 --- a/dbt_common/clients/jinja.py +++ b/dbt_common/clients/jinja.py @@ -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] = {}