Skip to content

Commit

Permalink
artiq: Update host exception list to match possibly thrown types
Browse files Browse the repository at this point in the history
Signed-off-by: David Mak <csdavidmak@ust.hk>
  • Loading branch information
David Mak committed Oct 30, 2023
1 parent 92391c4 commit 5b844a1
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions artiq/language/embedding_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ def __init__(self):
# must be kept in sync with EXCEPTION_ID_LOOKUP in artiq/firmware/ksupport/eh_artiq.rs,
# and src/runtime/src/eh_artiq.rs (Zynq)
self.preallocate_runtime_exception_names(["RuntimeError",
"RTIOUnderflow",
"RTIOOverflow",
"RTIODestinationUnreachable",
"DMAError",
"I2CError",
"CacheError",
"SPIError",
"0:ZeroDivisionError",
"0:IndexError",
"0:UnwrapNoneError"])
"RTIOUnderflow",
"RTIOOverflow",
"RTIODestinationUnreachable",
"DMAError",
"I2CError",
"CacheError",
"SPIError",
"0:ZeroDivisionError",
"0:IndexError",
"0:ValueError",
"0:RuntimeError",
"0:AssertionError",
"0:KeyError",
"0:NotImplementedError",
"0:OverflowError",
"0:IOError",
"0:UnwrapNoneError"])

def preallocate_runtime_exception_names(self, names):
for i, name in enumerate(names):
Expand Down

0 comments on commit 5b844a1

Please sign in to comment.