diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 01:07:25 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 01:07:25 +0000 |
commit | 52eea21814c1f0295ac2b166947cab3ba1be13a5 (patch) | |
tree | 27cacf5cfbb92e0ef92a62eea950c53f28859c6d /lib | |
parent | 30fb5607cd7f137aa4a8c52e51f00d2508b4a26d (diff) | |
download | klee-52eea21814c1f0295ac2b166947cab3ba1be13a5.tar.gz |
Kill off uses of C++ exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SMT/parser.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/SMT/parser.cpp b/lib/SMT/parser.cpp index 14cf97c8..fd23cc34 100644 --- a/lib/SMT/parser.cpp +++ b/lib/SMT/parser.cpp @@ -21,6 +21,7 @@ #include <fstream> #include <iomanip> +#include <iostream> #include "parser_temp.h" #include "parser.h" #include "parser_exception.h" @@ -51,7 +52,9 @@ namespace CVC3 { ParserTemp* parserTemp; int ParserTemp::error(const string& s) { - throw ParserException(s); + // FIXME: Fail better? + std::cerr << "error: " << s << "\n"; + exit(1); return 0; } @@ -80,7 +83,9 @@ namespace CVC3 { d_data->temp.fileName = fileName; d_data->temp.is = new ifstream(fileName.c_str()); if (!(*d_data->temp.is)) { - throw ParserException("File not found: "+fileName); + // FIXME: Fail better? + std::cerr << "error: File not found: " << fileName << "\n"; + exit(1); } d_data->temp.interactive = false; } @@ -123,17 +128,11 @@ namespace CVC3 { parserTemp = &(d_data->temp); // Switch to our buffer, in case there are multiple instances of // the parser running - try { - smtlib_switchToBuffer(d_data->buffer); - smtlib_setInteractive(d_data->temp.interactive); - smtlibparse(); - // Reset the prompt to the main one - d_data->temp.setPrompt1(); - } catch(Exception* e) { - cerr << d_data->temp.fileName << ":" << d_data->temp.lineNum - << ": " << e << endl; - return NULL;//Expr(); - } + smtlib_switchToBuffer(d_data->buffer); + smtlib_setInteractive(d_data->temp.interactive); + smtlibparse(); + // Reset the prompt to the main one + d_data->temp.setPrompt1(); return d_data->temp.expr; } |