Skip to content

Commit 8f91bdf

Browse files
author
Nejc Stebe
committed
display multiple error message lines after unrecoverable error
1 parent f250de4 commit 8f91bdf

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

render_machine/actions/run_unit_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def execute(self, render_context: RenderContext, _previous_action_payload: Any |
3939
RenderError.encode(
4040
message="Unit tests script failed due to problems in the environment setup. Please check your environment or update the script for running unittests.",
4141
error_type="ENVIRONMENT_ERROR",
42-
exit_code=exit_code,
4342
script=render_context.unittests_script,
4443
issue=unittests_issue,
4544
).to_payload(),

render_machine/render_types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ def format_for_display(self) -> str:
133133
if self.details:
134134
lines.append("\nDetails:")
135135
for detail_name, detail_value in self.details.items():
136-
lines.append(f" {detail_name}: {detail_value}")
136+
if detail_name == "issue":
137+
detail_value_indented = "\n".join(" " + line for line in detail_value.splitlines())
138+
lines.append(detail_value_indented)
139+
else:
140+
lines.append(f" {detail_name.capitalize()}: {detail_value}")
137141

138142
return "\n".join(lines)
139143

0 commit comments

Comments
 (0)