diff Mac/Modules/ctbmodule.c @ 6442:ddfcefc0d826 legacy-trunk

New exception interface
author Jack Jansen <jack.jansen@cwi.nl>
date Tue, 07 Oct 1997 21:47:25 +0000
parents 172c7febd755
children 4f45dccda96b
line wrap: on
line diff
--- a/Mac/Modules/ctbmodule.c	Tue Oct 07 21:22:48 1997 +0000
+++ b/Mac/Modules/ctbmodule.c	Tue Oct 07 21:47:25 1997 +0000
@@ -606,13 +606,9 @@
 	CMCONST("cmStatusListenPend", 0x2000);
 	CMCONST("cmStatusIncomingCallPresent", 0x4000);
 	
-	ErrorObject = PyString_FromString("ctb.error");
+	ErrorObject = PyErr_NewException("ctb.error", NULL, NULL);
 	PyDict_SetItemString(d, "error", ErrorObject);
 	ctbcmtype.ob_type = &PyType_Type;
 	Py_INCREF(&ctbcmtype);
 	PyDict_SetItemString(d, "CTBConnectionMgrType", (PyObject *)&ctbcmtype);
-
-	/* Check for errors */
-	if (PyErr_Occurred())
-		Py_FatalError("can't initialize module ctb");
 }