From 38c72fdab41679c300c235d960e87b9e06bea5b4 Mon Sep 17 00:00:00 2001 From: abdul124 Date: Fri, 23 Aug 2024 12:13:05 +0800 Subject: [PATCH] firmware/ksupport: restore exception id order --- artiq/firmware/ksupport/eh_artiq.rs | 30 +++++++++++------------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/artiq/firmware/ksupport/eh_artiq.rs b/artiq/firmware/ksupport/eh_artiq.rs index b47e61a20..36b27c458 100644 --- a/artiq/firmware/ksupport/eh_artiq.rs +++ b/artiq/firmware/ksupport/eh_artiq.rs @@ -334,26 +334,18 @@ extern fn stop_fn(_version: c_int, } // Must be kept in sync with `artiq.compiler.embedding` -static EXCEPTION_ID_LOOKUP: [(&str, u32); 19] = [ - ("RTIOUnderflow", 0), - ("RTIOOverflow", 1), - ("RTIODestinationUnreachable", 2), - ("DMAError", 3), - ("I2CError", 4), - ("CacheError", 5), - ("SPIError", 6), - ("AssertionError", 7), - ("AttributeError", 8), +static EXCEPTION_ID_LOOKUP: [(&str, u32); 11] = [ + ("RuntimeError", 0), + ("RTIOUnderflow", 1), + ("RTIOOverflow", 2), + ("RTIODestinationUnreachable", 3), + ("DMAError", 4), + ("I2CError", 5), + ("CacheError", 6), + ("SPIError", 7), + ("ZeroDivisionError", 8), ("IndexError", 9), - ("IOError", 10), - ("KeyError", 11), - ("NotImplementedError", 12), - ("OverflowError", 13), - ("RuntimeError", 14), - ("TimeoutError", 15), - ("TypeError", 16), - ("ValueError", 17), - ("ZeroDivisionError", 18), + ("UnwrapNoneError", 10), ]; pub fn get_exception_id(name: &str) -> u32 {