mirror of https://github.com/arendst/Tasmota.git
Berry fix exceptions
This commit is contained in:
parent
fa7b0302a7
commit
47deea04ce
|
@ -1062,7 +1062,13 @@ newframe: /* a new call frame */
|
||||||
if (!IGET_RA(ins)) {
|
if (!IGET_RA(ins)) {
|
||||||
be_except_block_setup(vm);
|
be_except_block_setup(vm);
|
||||||
if (be_setjmp(vm->errjmp->b)) {
|
if (be_setjmp(vm->errjmp->b)) {
|
||||||
|
bvalue *top = vm->top;
|
||||||
|
bvalue e1 = top[0];
|
||||||
|
bvalue e2 = top[1];
|
||||||
be_except_block_resume(vm);
|
be_except_block_resume(vm);
|
||||||
|
top = vm->top;
|
||||||
|
top[0] = e1;
|
||||||
|
top[1] = e2;
|
||||||
goto newframe;
|
goto newframe;
|
||||||
}
|
}
|
||||||
reg = vm->reg;
|
reg = vm->reg;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
try
|
||||||
|
for k: 0..1 assert({'a':1}.contains('b'), 'failure') end
|
||||||
|
except .. as e,m
|
||||||
|
assert(e == "assert_failed")
|
||||||
|
assert(m == "failure")
|
||||||
|
end
|
Loading…
Reference in New Issue