From fdd00c4dbfa64da59c65d5d1fef3e8505a842cc8 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 21 May 2012 16:33:53 +0000 Subject: [PATCH] main() no longer catches non-CVC4 exceptions. This means on memout and other C++-level exceptions, we'll exit the C++ way rather than our custom way (so we don't get statistics etc.) --- src/main/driver_portfolio.cpp | 18 +----------------- src/main/main.cpp | 18 +----------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/main/driver_portfolio.cpp b/src/main/driver_portfolio.cpp index 6cf9d0130..c1c3f699b 100644 --- a/src/main/driver_portfolio.cpp +++ b/src/main/driver_portfolio.cpp @@ -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 diff --git a/src/main/main.cpp b/src/main/main.cpp index 5d051cdad..b90ab433a 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -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); } -- 2.30.2