diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-20 17:40:24 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-20 17:40:24 -0800 |
commit | 00f823aee439ed8c2cdd71dfbb89385dc68eae7b (patch) | |
tree | e30066afd19f0ab5d31b87c5e2645d6f25ca4596 /unwind.c | |
parent | 1dc0ed67b0b00b74f2abbf4e5a5d9512bb04dab0 (diff) | |
download | txr-00f823aee439ed8c2cdd71dfbb89385dc68eae7b.tar.gz txr-00f823aee439ed8c2cdd71dfbb89385dc68eae7b.tar.bz2 txr-00f823aee439ed8c2cdd71dfbb89385dc68eae7b.zip |
* unwind.c (uw_throw): If streams are not initialized,
we have an unhandled exception too early in initialization.
Use C stream to print an error message and abort.
Using the nil stream variable will just cause a recursion bomb.
Diffstat (limited to 'unwind.c')
-rw-r--r-- | unwind.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -215,6 +215,11 @@ val uw_throw(val sym, val exception) } if (ex == 0) { + if (std_error == 0) { + fprintf(stderr, "unhandled exception in early initialization\n"); + abort(); + } + if (opt_loglevel >= 1) { val s = stringp(exception); format(std_error, lit("~a: unhandled exception of type ~a:\n"), |