diff options
Diffstat (limited to 'sys/boot/common/interp_forth.c')
-rw-r--r-- | sys/boot/common/interp_forth.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c index 37b377b..7137d37 100644 --- a/sys/boot/common/interp_forth.c +++ b/sys/boot/common/interp_forth.c @@ -138,13 +138,23 @@ bf_command(FICL_VM *vm) } else { result=BF_PARSE; } + + switch (result) { + case CMD_CRIT: + printf("%s\n", command_errmsg); + break; + case CMD_FATAL: + panic("%s\n", command_errmsg); + } + free(line); /* * If there was error during nested ficlExec(), we may no longer have * valid environment to return. Throw all exceptions from here. */ - if (result != 0) + if (result != CMD_OK) vmThrow(vm, result); + /* This is going to be thrown!!! */ stackPushINT(vm->pStack,result); } |