Skip to content

Commit c8aabde

Browse files
committed
add tracked_args default
1 parent ba3e3c4 commit c8aabde

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,6 @@ def handle_exception(self, e: SotCapturedException):
683683
self._graph,
684684
DummyTracker(e.tracked_args),
685685
)
686-
delattr(e, "tracked_args")
687686

688687
# The exception is not raised by `raise Exception`
689688
if (

python/paddle/jit/sot/utils/exceptions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ def create(
444444
new_exc.__traceback__ = origin_exc.__traceback__
445445

446446
# Propagating Exception Parameters through SotCapturedException
447+
if tracked_args is None:
448+
tracked_args = []
447449
new_exc.tracked_args = tracked_args
448450

449451
return new_exc

0 commit comments

Comments
 (0)