diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-07-05 23:01:36 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-07-05 23:01:36 +0000 |
commit | 7d70fd80347e655e9703c2838a4a106d580c4a2d (patch) | |
tree | 208ec512ecc5ede76167245efb32f3db7228f606 /src/main/util.cpp | |
parent | 005200d69b6bd12cd4c15679ae1e6ffdb25b91a4 (diff) |
better exception wording, assertion-handling in multiple-exception case; resolves bug 175. also newer URL for config/pkg.m4
Diffstat (limited to 'src/main/util.cpp')
-rw-r--r-- | src/main/util.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main/util.cpp b/src/main/util.cpp index eb7b56b19..c685766fa 100644 --- a/src/main/util.cpp +++ b/src/main/util.cpp @@ -72,14 +72,15 @@ static terminate_handler default_terminator; void cvc4unexpected() { #ifdef CVC4_DEBUG - fprintf(stderr, - "\n" - "CVC4 threw an \"unexpected\" exception (one that wasn't properly specified\n" - "in the throws() specifier for the throwing function).\n\n"); - if(CVC4::s_debugAssertionFailure == NULL) { - fprintf(stderr, "The exception is unknown.\n\n"); + fprintf(stderr, "\n" + "CVC4 threw an \"unexpected\" exception (one that wasn't properly " + "specified\nin the throws() specifier for the throwing function)." + "\n\n"); + if(CVC4::s_debugLastException == NULL) { + fprintf(stderr, + "The exception is unknown (maybe it's not a CVC4::Exception).\n\n"); } else { - fprintf(stderr, "The exception is:\n%s\n\n", CVC4::s_debugAssertionFailure); + fprintf(stderr, "The exception is:\n%s\n\n", CVC4::s_debugLastException); } if(segvNoSpin) { fprintf(stderr, "No-spin requested.\n"); @@ -99,10 +100,10 @@ void cvc4unexpected() { void cvc4terminate() { #ifdef CVC4_DEBUG - fprintf(stderr, - "\n" + fprintf(stderr, "\n" "CVC4 was terminated by the C++ runtime.\n" - "Perhaps an exception was thrown during stack unwinding. (Don't do that.)\n"); + "Perhaps an exception was thrown during stack unwinding. " + "(Don't do that.)\n"); default_terminator(); #else /* CVC4_DEBUG */ fprintf(stderr, |