Skip to content

Commit 259048f

Browse files
committed
fix: improve error message if trace generation fails
1) grammar: "Fail to generate trace" -> "Failure generating trace" 2) add text of error message, which previously was not reported Signed-off-by: Nick Mitchell <[email protected]>
1 parent 0e1dd84 commit 259048f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pdl/pdl_interpreter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ def write_trace(
223223
try:
224224
with open(trace_file, "w", encoding="utf-8") as fp:
225225
json.dump(block_to_dict(trace, json_compatible=True), fp)
226-
except Exception:
227-
print("Fail to generate the trace", file=sys.stderr)
226+
except Exception as e:
227+
print(f"Failure generating the trace: {str(e)}", file=sys.stderr)
228228

229229

230230
def process_prog(

0 commit comments

Comments
 (0)