Skip to content

Commit 1a37dfb

Browse files
provide additional info for the runtime stage
1 parent d030853 commit 1a37dfb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sqlmesh/core/environment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,6 @@ def execute_environment_statements(
286286
try:
287287
adapter.execute(expr)
288288
except Exception as e:
289-
raise SQLMeshError(f"An error occurred during execution of:\n\n{expr}\n\n{e}")
289+
raise SQLMeshError(
290+
f"An error occurred during execution of the following `{runtime_stage.value}` statement:\n\n{expr}\n\n{e}"
291+
)

tests/core/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5531,7 +5531,7 @@ def test_environment_statements_error_handling(tmp_path: Path):
55315531
ctx = Context(paths=[tmp_path], config=config)
55325532

55335533
expected_error_message = re.escape(
5534-
"""An error occurred during execution of:
5534+
"""An error occurred during execution of the following `before_all` statement:
55355535
55365536
CREATE TABLE identical_table (physical_schema_name TEXT)
55375537

0 commit comments

Comments
 (0)