[PPL-devel] [GIT] ppl/ppl(master): Fixed oversight in error-handling code.

Roberto Bagnara bagnara at cs.unipr.it
Mon Feb 22 09:17:35 CET 2010


Module: ppl/ppl
Branch: master
Commit: 537a4928e00e2b811822089da4cf12a1dd4344cf
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=537a4928e00e2b811822089da4cf12a1dd4344cf

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Mon Feb 22 09:16:36 2010 +0100

Fixed oversight in error-handling code.

---

 interfaces/C/tests/watchdog1.c    |    6 ++++--
 interfaces/C/tests/weightwatch1.c |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/interfaces/C/tests/watchdog1.c b/interfaces/C/tests/watchdog1.c
index 45a01cc..a75ed07 100644
--- a/interfaces/C/tests/watchdog1.c
+++ b/interfaces/C/tests/watchdog1.c
@@ -20,9 +20,10 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
 For the most up-to-date information see the Parma Polyhedra Library
 site: http://www.cs.unipr.it/ppl/ . */
 
-#include "ppl_c.h"
+#include "ppl_c_test.h"
 #include <stdlib.h>
 #include <stdarg.h>
+#include <stdio.h>
 
 static const char* program_name = 0;
 
@@ -54,7 +55,8 @@ error_handler(enum ppl_enum_error_code code,
   if (code == PPL_ERROR_INTERNAL_ERROR)
     my_exit(0);
 #endif
-  fatal("PPL error code %d: %s", code, description);
+  if (check_noisy() || check_very_noisy())
+    fprintf(stderr, "PPL error code %d: %s\n", code, description);
 }
 
 void
diff --git a/interfaces/C/tests/weightwatch1.c b/interfaces/C/tests/weightwatch1.c
index 7882be1..cf1bab3 100644
--- a/interfaces/C/tests/weightwatch1.c
+++ b/interfaces/C/tests/weightwatch1.c
@@ -20,9 +20,10 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
 For the most up-to-date information see the Parma Polyhedra Library
 site: http://www.cs.unipr.it/ppl/ . */
 
-#include "ppl_c.h"
+#include "ppl_c_test.h"
 #include <stdlib.h>
 #include <stdarg.h>
+#include <stdio.h>
 
 static const char* program_name = 0;
 
@@ -46,7 +47,8 @@ fatal(const char* format, ...) {
 static void
 error_handler(enum ppl_enum_error_code code,
 	      const char* description) {
-  fatal("PPL error code %d: %s", code, description);
+  if (check_noisy() || check_very_noisy())
+    fprintf(stderr, "PPL error code %d: %s\n", code, description);
 }
 
 void




More information about the PPL-devel mailing list