Skip to content

Commit 247bf0d

Browse files
committed
do not catch inside method, this breaks the stack trace (#62)
1 parent 5c1d0f5 commit 247bf0d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/bloqade/shuttle/dialects/path/constprop.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import cast
22

33
from kirin.analysis import const, forward
4-
from kirin.interp import InterpreterError, MethodTable, impl
4+
from kirin.interp import MethodTable, impl
55

66
from bloqade.shuttle.codegen import TraceInterpreter, reverse_path
77
from bloqade.shuttle.dialects import schedule
@@ -43,17 +43,14 @@ def gen(
4343
device_task.move_fn.arg_names, inputs_results, kwargs
4444
)
4545

46-
try:
47-
path = TraceInterpreter(stmt.arch_spec).run_trace(
48-
device_task.move_fn,
49-
tuple(
50-
cast(const.Value, arg).data if isinstance(arg, const.Value) else arg
51-
for arg in args
52-
),
53-
{},
54-
)
55-
except InterpreterError:
56-
return (const.Result.top(),)
46+
path = TraceInterpreter(stmt.arch_spec).run_trace(
47+
device_task.move_fn,
48+
tuple(
49+
cast(const.Value, arg).data if isinstance(arg, const.Value) else arg
50+
for arg in args
51+
),
52+
{},
53+
)
5754

5855
if reverse:
5956
path = reverse_path(path)

0 commit comments

Comments
 (0)