From 295964d8c81b945f7c7381132f6a71a1b6b46a24 Mon Sep 17 00:00:00 2001 From: abdul124 Date: Fri, 23 Aug 2024 12:22:16 +0800 Subject: [PATCH] firware: restore exception id order --- src/libksupport/src/eh_artiq.rs | 37 +++++++++++++-------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/src/libksupport/src/eh_artiq.rs b/src/libksupport/src/eh_artiq.rs index f8f86ef..e81b2f7 100644 --- a/src/libksupport/src/eh_artiq.rs +++ b/src/libksupport/src/eh_artiq.rs @@ -476,28 +476,21 @@ extern "C" fn stop_fn( } // Must be kept in sync with preallocate_runtime_exception_names() in `artiq.compiler.embedding` -static EXCEPTION_ID_LOOKUP: [(&str, u32); 21] = [ - ("RTIOUnderflow", 0), - ("RTIOOverflow", 1), - ("RTIODestinationUnreachable", 2), - ("DMAError", 3), - ("I2CError", 4), - ("CacheError", 5), - ("SPIError", 6), - ("SubkernelError", 7), - ("AssertionError", 8), - ("AttributeError", 9), - ("IndexError", 10), - ("IOError", 11), - ("KeyError", 12), - ("NotImplementedError", 13), - ("OverflowError", 14), - ("RuntimeError", 15), - ("TimeoutError", 16), - ("TypeError", 17), - ("ValueError", 18), - ("ZeroDivisionError", 19), - ("LinAlgError", 20), +static EXCEPTION_ID_LOOKUP: [(&str, u32); 14] = [ + ("RuntimeError", 0), + ("RTIOUnderflow", 1), + ("RTIOOverflow", 2), + ("RTIODestinationUnreachable", 3), + ("DMAError", 4), + ("I2CError", 5), + ("CacheError", 6), + ("SPIError", 7), + ("ZeroDivisionError", 8), + ("IndexError", 9), + ("UnwrapNoneError", 10), + ("SubkernelError", 11), + ("ValueError", 12), + ("LinAlgError", 13), ]; pub fn get_exception_id(name: &str) -> u32 {