diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-02-03 22:20:25 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-02-03 22:20:25 +0000 |
commit | 64d530e5b9096e66398f92d93cf7bc4268df0e70 (patch) | |
tree | 189d63541053faca0c778b0c92d84db8d2b1e0ff /src/util/Assert.h | |
parent | 842fd54de1da122f4c7274796550c2fe21c11db2 (diff) |
Addressed many of the concerns of bug 10 (build system code review).
Some parts split into other bugs: 19, 20, 21.
Addressed concerns of bug 11 (util package code review).
Slight parser source file modifications: file comments, #included
headers in generated parsers/lexers
Added CVC4::Result propagation back through
MiniSat->PropEngine->SmtEngine->main(). Silenced MiniSat when
verbosity is not requested.
Diffstat (limited to 'src/util/Assert.h')
-rw-r--r-- | src/util/Assert.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util/Assert.h b/src/util/Assert.h index d8e881613..fa05ecaa5 100644 --- a/src/util/Assert.h +++ b/src/util/Assert.h @@ -17,6 +17,7 @@ #define __CVC4__ASSERT_H #include <string> +#include <sstream> #include <cstdio> #include <cstdarg> #include "util/exception.h" @@ -35,9 +36,11 @@ protected: construct(header, extra, function, file, line, fmt, args); va_end(args); } + void construct(const char* header, const char* extra, const char* function, const char* file, unsigned line, const char* fmt, va_list args); + void construct(const char* header, const char* extra, const char* function, const char* file, unsigned line); @@ -99,11 +102,14 @@ public: va_end(args); } + template <class T> UnhandledCaseException(const char* function, const char* file, - unsigned line, int theCase) : + unsigned line, T theCase) : UnreachableCodeException() { + std::stringstream sb; + sb << theCase; construct("Unhandled case encountered", - NULL, function, file, line, "The case was: %d", theCase); + NULL, function, file, line, "The case was: %s", sb.str().c_str()); } UnhandledCaseException(const char* function, const char* file, |