[Commit] nickle/builtin math.c,1.8,1.9

Keith Packard commit at keithp.com
Mon Jun 2 22:51:35 PDT 2003


Committed by: keithp

Update of /local/src/CVS/nickle/builtin
In directory evo:/local/src/nickle/builtin

Modified Files:
	math.c 
Log Message:
Eliminate remaining RaiseError calls. Make unhandled exceptions get a continuation to the crash through to the debugger with a magic stack push/pop

Index: math.c
===================================================================
RCS file: /local/src/CVS/nickle/builtin/math.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- math.c	15 Nov 2002 08:13:40 -0000	1.8
+++ math.c	3 Jun 2003 04:51:13 -0000	1.9
@@ -85,12 +85,16 @@
 
     if (!Integralp (ValueTag(av)))
     {
-	RaiseError ("popcount: non-integer argument %v", av);
+	RaiseStandardException (exception_invalid_argument,
+				"Math::popcount: not an integer",
+				2, av, Void);
 	RETURN (Void);
     }
     if (Negativep (av))
     {
-	RaiseError ("popcount: negative argument %v", av);
+	RaiseStandardException (exception_invalid_argument,
+				"Math::popcount: negative argument",
+				2, av, Void);
 	RETURN (Void);
     }
     switch (ValueTag(av)) {
@@ -120,7 +124,9 @@
 	    ret = Plus (ret, NewInt (part));
 	break;
     default:
-	RaiseError ("popcount: uncaught non-integer argument %v", av);
+	RaiseStandardException (exception_invalid_argument,
+				"Math::popcount: not an integer",
+				2, av, Void);
 	RETURN (Void);
     }
     RETURN (ret);




More information about the Commit mailing list