summaryrefslogtreecommitdiff
path: root/src/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r--src/main/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index ba71b043f..6f32e474b 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -28,6 +28,7 @@
#include "expr/expr_manager.h"
#include "smt/smt_engine.h"
#include "util/command.h"
+#include "util/Assert.h"
#include "util/output.h"
#include "util/options.h"
@@ -55,7 +56,7 @@ int main(int argc, char *argv[]) {
// We only accept one input file
if(argc > firstArgIndex + 1) {
- throw new Exception("Too many input files specified.");
+ throw Exception("Too many input files specified.");
}
// Create the expression manager
@@ -144,8 +145,10 @@ int main(int argc, char *argv[]) {
// Remove the parser
delete parser;
- // Delete handle to input file
- delete file;
+ if(! inputFromStdin) {
+ // Delete handle to input file
+ delete file;
+ }
} catch(OptionException& e) {
if(options.smtcomp_mode) {
cout << "unknown" << endl;
@@ -153,7 +156,7 @@ int main(int argc, char *argv[]) {
cerr << "CVC4 Error:" << endl << e << endl;
printf(usage, options.binary_name.c_str());
abort();
- } catch(CVC4::Exception& e) {
+ } catch(Exception& e) {
if(options.smtcomp_mode) {
cout << "unknown" << endl;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback