diff options
Diffstat (limited to 'src/pkg/runtime/panic.c')
| -rw-r--r-- | src/pkg/runtime/panic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index 8225df7db7..ce05725037 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -525,6 +525,18 @@ runtime·throw(int8 *s) } void +runtime·throwgo(String s) +{ + if(g->m->throwing == 0) + g->m->throwing = 1; + runtime·startpanic(); + runtime·printf("fatal error: %S\n", s); + runtime·dopanic(0); + *(int32*)0 = 0; // not reached + runtime·exit(1); // even more not reached +} + +void runtime·panicstring(int8 *s) { Eface err; |
