mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
enable assert print inner try block
This commit is contained in:
parent
83d5bd8379
commit
a383bbaa11
14
src/PikaVM.c
14
src/PikaVM.c
@ -2940,14 +2940,14 @@ static Arg* VM_instruction_handler_ASS(PikaObj* self,
|
||||
arg_getBool(arg1) == PIKA_FALSE)) {
|
||||
stack_pushArg(&vm->stack, arg_newInt(PIKA_RES_ERR_ASSERT));
|
||||
res = VM_instruction_handler_RIS(self, vm, data, arg_ret_reg);
|
||||
if (vm->run_state->try_state == TRY_STATE_NONE) {
|
||||
if (n_arg == 1) {
|
||||
pika_platform_printf("AssertionError\n");
|
||||
}
|
||||
if (n_arg == 2) {
|
||||
pika_platform_printf("AssertionError: %s\n", arg_getStr(arg2));
|
||||
}
|
||||
// if (vm->run_state->try_state == TRY_STATE_NONE) {
|
||||
if (n_arg == 1) {
|
||||
pika_platform_printf("AssertionError\n");
|
||||
}
|
||||
if (n_arg == 2) {
|
||||
pika_platform_printf("AssertionError: %s\n", arg_getStr(arg2));
|
||||
}
|
||||
// }
|
||||
goto exit;
|
||||
}
|
||||
exit:
|
||||
|
Loading…
x
Reference in New Issue
Block a user