diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-05-21 16:33:53 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-05-21 16:33:53 +0000 |
commit | fdd00c4dbfa64da59c65d5d1fef3e8505a842cc8 (patch) | |
tree | 255a9ddbbaccc05b8be736e20871b1d902d0bc34 /src/main | |
parent | 50ad9f07cb754c2c09a4775e1bc73230f440cfed (diff) |
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.)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/driver_portfolio.cpp | 18 | ||||
-rw-r--r-- | 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<typename T> 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); } |