diff --git a/dace/frontend/python/newast.py b/dace/frontend/python/newast.py index 46db3a3a5d..1b11fb00c6 100644 --- a/dace/frontend/python/newast.py +++ b/dace/frontend/python/newast.py @@ -279,10 +279,10 @@ def repl_callback(repldict): ProgramVisitor.increment_progress() except SkipCall: raise - except Exception: + except Exception as e: # Print the offending line causing the exception li = visitor.current_lineinfo - print(f'Exception raised while parsing DaCe program:\n in File "{li.filename}", line {li.start_line}') + print(f'Exception {e} raised while parsing DaCe program:\n in File "{li.filename}", line {li.start_line}') lines = preprocessed_ast.src.split('\n') lineid = li.start_line - preprocessed_ast.src_line - 1 if lineid >= 0 and lineid < len(lines):