diff liboctave/Bounds.cc @ 227:1a48a1b91489

[project @ 1993-11-15 10:10:35 by jwe]
author jwe
date Mon, 15 Nov 1993 10:11:59 +0000
parents 9a4c07481e61
children 780cbbc57b7c
line wrap: on
line diff
--- a/liboctave/Bounds.cc	Mon Nov 15 10:06:26 1993 +0000
+++ b/liboctave/Bounds.cc	Mon Nov 15 10:11:59 1993 +0000
@@ -27,14 +27,14 @@
 
 #include <iostream.h>
 #include "Bounds.h"
+#include "lo-error.h"
 
 // error handling
 
 void
 Bounds::error (const char* msg)
 {
-  cerr << "Fatal bounds error. " << msg << "\n";
-  exit(1);
+  (*current_liboctave_error_handler) ("fatal bounds error: ", msg);
 }
 
 Bounds::Bounds (void)
@@ -54,7 +54,10 @@
 Bounds::Bounds (const ColumnVector l, const ColumnVector u)
 {
   if (l.capacity () != u.capacity ())
-    error ("inconsistent sizes for lower and upper bounds");
+    {
+      error ("inconsistent sizes for lower and upper bounds");
+      return;
+    }
 
   nb = l.capacity ();
   lb = l;
@@ -140,7 +143,10 @@
 Bounds::set_bounds (const ColumnVector l, const ColumnVector u)
 {
   if (l.capacity () != u.capacity ())
-    error ("inconsistent sizes for lower and upper bounds");
+    {
+      error ("inconsistent sizes for lower and upper bounds");
+      return *this;
+    }
 
   nb = l.capacity ();
   lb = l;
@@ -185,7 +191,10 @@
 Bounds::set_lower_bounds (const ColumnVector l)
 {
   if (nb != l.capacity ())
-    error ("inconsistent size for lower bounds");
+    {
+      error ("inconsistent size for lower bounds");
+      return *this;
+    }
 
   lb = l;
 
@@ -196,7 +205,10 @@
 Bounds::set_upper_bounds (const ColumnVector u)
 {
   if (nb != u.capacity ())
-    error ("inconsistent size for upper bounds");
+    {
+      error ("inconsistent size for upper bounds");
+      return *this;
+    }
 
   ub = u;