From 352cf907ee67f7db5478fe23217cd5fcb7334617 Mon Sep 17 00:00:00 2001 From: abdul124 Date: Fri, 23 Aug 2024 16:57:21 +0800 Subject: [PATCH] compiler: add UnwrapNoneError exception --- artiq/compiler/embedding.py | 1 + artiq/coredevice/exceptions.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index 7893762a6..f854686f8 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -114,6 +114,7 @@ class EmbeddingMap: "0:ValueError", "0:ZeroDivisionError", "0:LinAlgError", + "UnwrapNoneError", ]) def preallocate_runtime_exception_names(self, names): diff --git a/artiq/coredevice/exceptions.py b/artiq/coredevice/exceptions.py index 313b2e040..2edf71558 100644 --- a/artiq/coredevice/exceptions.py +++ b/artiq/coredevice/exceptions.py @@ -182,3 +182,8 @@ class I2CError(Exception): class SPIError(Exception): """Raised when a SPI transaction fails.""" artiq_builtin = True + + +class UnwrapNoneError(Exception): + """Raised when unwrapping a none Option.""" + artiq_builtin = True