diff options
Diffstat (limited to 'src/interp/routines/execute.c')
| -rw-r--r-- | src/interp/routines/execute.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/interp/routines/execute.c b/src/interp/routines/execute.c index fe1e8d7..d04363e 100644 --- a/src/interp/routines/execute.c +++ b/src/interp/routines/execute.c @@ -33,7 +33,17 @@ static enum nw_state repeat(struct nw_interp *const i) struct nw_next *const next = &b->next; const enum nw_state n = next->fn(next->user, next); - if (n) + if (n == NW_FATAL) + { + static const char *const exc = "pc callback failed"; + + i->exception = exc; +#ifdef NW_LOG + nwp_log("%s, pc: %ld\n", exc, b->pc); +#endif + return NW_FATAL; + } + else if (n) return n; return execute(i); |
