main() no longer catches non-CVC4 exceptions. This means on memout and other C+...
authorMorgan Deters <mdeters@gmail.com>
Mon, 21 May 2012 16:33:53 +0000 (16:33 +0000)
committerMorgan Deters <mdeters@gmail.com>
Mon, 21 May 2012 16:33:53 +0000 (16:33 +0000)
src/main/driver_portfolio.cpp
src/main/main.cpp

index 6cf9d0130b1d74df8e40dd05ce738c50b660a8a5..c1c3f699bcfc8715276bcaf2422573d5c5838cbe 100644 (file)
@@ -700,7 +700,6 @@ Result doSmt(SmtEngine &smt, Command *cmd, Options &options) {
     *pOptions->out << "unknown" << endl;
     cerr << "CVC4 Error:" << endl << e << endl;
     printUsage(*pOptions);
-    return Result::SAT_UNKNOWN;
   } catch(Exception& e) {
 #ifdef CVC4_COMPETITION_MODE
     *pOptions->out << "unknown" << endl;
@@ -709,23 +708,8 @@ Result doSmt(SmtEngine &smt, Command *cmd, Options &options) {
     if(pOptions->statistics) {
       pStatistics->flushInformation(*pOptions->err);
     }
-    return Result::SAT_UNKNOWN;
-  } catch(bad_alloc) {
-#ifdef CVC4_COMPETITION_MODE
-    *pOptions->out << "unknown" << endl;
-#endif
-    *pOptions->err << "CVC4 ran out of memory." << endl;
-    if(pOptions->statistics) {
-      pStatistics->flushInformation(*pOptions->err);
-    }
-    return Result::SAT_UNKNOWN;
-  } catch(...) {
-#ifdef CVC4_COMPETITION_MODE
-    *pOptions->out << "unknown" << endl;
-#endif
-    *pOptions->err << "CVC4 threw an exception of unknown type." << endl;
-    return Result::SAT_UNKNOWN;
   }
+  return Result::SAT_UNKNOWN;
 }
 
 template<typename T>
index 5d051cdad54304c85c5adb80ba0293957d6eb671..b90ab433a16e47c9003c70dd4b060c4c9f8c9a19 100644 (file)
@@ -60,7 +60,6 @@ int main(int argc, char* argv[]) {
 #endif
     cerr << "CVC4 Error:" << endl << e << endl;
     printUsage(options);
-    exit(1);
   } catch(Exception& e) {
 #ifdef CVC4_COMPETITION_MODE
     *options.out << "unknown" << endl;
@@ -69,21 +68,6 @@ int main(int argc, char* argv[]) {
     if(options.statistics && pStatistics != NULL) {
       pStatistics->flushInformation(*options.err);
     }
-    exit(1);
-  } catch(bad_alloc&) {
-#ifdef CVC4_COMPETITION_MODE
-    *options.out << "unknown" << endl;
-#endif
-    *options.err << "CVC4 ran out of memory." << endl;
-    if(options.statistics && pStatistics != NULL) {
-      pStatistics->flushInformation(*options.err);
-    }
-    exit(1);
-  } catch(...) {
-#ifdef CVC4_COMPETITION_MODE
-    *options.out << "unknown" << endl;
-#endif
-    *options.err << "CVC4 threw an exception of unknown type." << endl;
-    exit(1);
   }
+  exit(1);
 }