1
0
Fork 0

firmware: add UnwrapNoneError exception

This commit is contained in:
abdul124 2024-08-23 16:50:47 +08:00
parent 85e8a3fc44
commit e8d77fca3e
1 changed files with 2 additions and 1 deletions

View File

@ -476,7 +476,7 @@ extern "C" fn stop_fn(
} }
// Must be kept in sync with preallocate_runtime_exception_names() in `artiq.compiler.embedding` // Must be kept in sync with preallocate_runtime_exception_names() in `artiq.compiler.embedding`
static EXCEPTION_ID_LOOKUP: [(&str, u32); 21] = [ static EXCEPTION_ID_LOOKUP: [(&str, u32); 22] = [
("RTIOUnderflow", 0), ("RTIOUnderflow", 0),
("RTIOOverflow", 1), ("RTIOOverflow", 1),
("RTIODestinationUnreachable", 2), ("RTIODestinationUnreachable", 2),
@ -498,6 +498,7 @@ static EXCEPTION_ID_LOOKUP: [(&str, u32); 21] = [
("ValueError", 18), ("ValueError", 18),
("ZeroDivisionError", 19), ("ZeroDivisionError", 19),
("LinAlgError", 20), ("LinAlgError", 20),
("UnwrapNoneError", 21)
]; ];
pub fn get_exception_id(name: &str) -> u32 { pub fn get_exception_id(name: &str) -> u32 {