Skip to content

Commit e5bf9e5

Browse files
authored
[SOT] Fix lost error info (PaddlePaddle#71385)
1 parent fef307a commit e5bf9e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class DataDependencyControlFlowBreak(DataDependencyBreak):
5050

5151
def __init__(self, reason_str=None, file_path="", line_number=-1):
5252
if reason_str is None:
53-
5453
reason_str = "OpcodeInlineExecutor want break graph when simulate control flow."
5554

5655
super().__init__(
@@ -193,7 +192,7 @@ def __init__(self, msg, disable_eval_frame=False):
193192
# raise in inline function call strategy.
194193
class BreakGraphError(SotErrorBase):
195194
def __init__(self, reason: BreakGraphReasonBase | str = None):
196-
super().__init__()
195+
super().__init__(str(reason))
197196

198197
if isinstance(reason, str):
199198
# if reason is a string, then create a UnspecifiedBreakReason object

0 commit comments

Comments
 (0)