[PPL-devel] [GIT] ppl/ppl(master): Cater for systems where Watchdog objects are not supported.
Roberto Bagnara
bagnara at cs.unipr.it
Mon Jun 25 07:30:20 CEST 2012
Module: ppl/ppl
Branch: master
Commit: 1fdc42b117a044a92a4c3fc74835477fe4437d6a
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=1fdc42b117a044a92a4c3fc74835477fe4437d6a
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Mon Jun 25 07:28:43 2012 +0200
Cater for systems where Watchdog objects are not supported.
---
tests/MIP_Problem/mipproblem2.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/MIP_Problem/mipproblem2.cc b/tests/MIP_Problem/mipproblem2.cc
index 3f436c5..60a07b0 100644
--- a/tests/MIP_Problem/mipproblem2.cc
+++ b/tests/MIP_Problem/mipproblem2.cc
@@ -139,6 +139,14 @@ bool test01() {
nout << "timeout, as expected" << endl;
return true;
}
+#if !PPL_WATCHDOG_OBJECTS_ARE_SUPPORTED
+ // If Watchdog objects are not supported, an std::logic_error exception
+ // will be thrown: this is normal.
+ catch (const std::logic_error& e) {
+ nout << "std::logic_error exception caught: \n" << e.what() << std::endl;
+ exit(0);
+ }
+#endif // !PPL_WATCHDOG_OBJECTS_ARE_SUPPORTED
catch (const std::overflow_error& e) {
abandon_expensive_computations = 0;
if (std::numeric_limits<Coefficient>::is_integer
More information about the PPL-devel
mailing list