mirror of https://github.com/m-labs/artiq.git
soc/runtime/exceptions: do not crash when exception is raised with no handler
This commit is contained in:
parent
76fed11d59
commit
5d8c53abb3
|
@ -30,6 +30,9 @@ int exception_getid(void)
|
||||||
|
|
||||||
void exception_raise(int id)
|
void exception_raise(int id)
|
||||||
{
|
{
|
||||||
stored_id = id;
|
if(ec_top > 0) {
|
||||||
exception_longjmp(exception_contexts[--ec_top].jb);
|
stored_id = id;
|
||||||
|
exception_longjmp(exception_contexts[--ec_top].jb);
|
||||||
|
} else
|
||||||
|
corecom_log("WARNING: uncaught exception, ID=%d\n", id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue