PRE_INIT(BaseException) PRE_INIT(Exception) PRE_INIT(StandardError) PRE_INIT(TypeError) PRE_INIT(StopIteration) PRE_INIT(GeneratorExit) PRE_INIT(SystemExit) PRE_INIT(KeyboardInterrupt) PRE_INIT(ImportError) PRE_INIT(EnvironmentError) PRE_INIT(IOError) PRE_INIT(OSError)#ifdef MS_WINDOWS PRE_INIT(WindowsError)#endif#ifdef __VMS PRE_INIT(VMSError)#endif PRE_INIT(EOFError) PRE_INIT(RuntimeError) PRE_INIT(NotImplementedError) PRE_INIT(NameError) PRE_INIT(UnboundLocalError) PRE_INIT(AttributeError) PRE_INIT(SyntaxError) PRE_INIT(IndentationError) PRE_INIT(TabError) PRE_INIT(LookupError) PRE_INIT(IndexError) PRE_INIT(KeyError) PRE_INIT(ValueError) PRE_INIT(UnicodeError)#ifdef Py_USING_UNICODE PRE_INIT(UnicodeEncodeError) PRE_INIT(UnicodeDecodeError) PRE_INIT(UnicodeTranslateError)#endif PRE_INIT(AssertionError) PRE_INIT(ArithmeticError) PRE_INIT(FloatingPointError) PRE_INIT(OverflowError) PRE_INIT(ZeroDivisionError) PRE_INIT(SystemError) PRE_INIT(ReferenceError) PRE_INIT(MemoryError) PRE_INIT(Warning) PRE_INIT(UserWarning) PRE_INIT(DeprecationWarning) PRE_INIT(PendingDeprecationWarning) PRE_INIT(SyntaxWarning) PRE_INIT(RuntimeWarning) PRE_INIT(FutureWarning) PRE_INIT(ImportWarning) PRE_INIT(UnicodeWarning) m = Py_InitModule4("exceptions", functions, exceptions_doc, (PyObject *)NULL, PYTHON_API_VERSION); if (m == NULL) return; bltinmod = PyImport_ImportModule("__builtin__"); if (bltinmod == NULL) Py_FatalError("exceptions bootstrapping error."); bdict = PyModule_GetDict(bltinmod); if (bdict == NULL) Py_FatalError("exceptions bootstrapping error."); POST_INIT(BaseException) POST_INIT(Exception) POST_INIT(StandardError) POST_INIT(TypeError) POST_INIT(StopIteration) POST_INIT(GeneratorExit) POST_INIT(SystemExit) POST_INIT(KeyboardInterrupt) POST_INIT(ImportError) POST_INIT(EnvironmentError) POST_INIT(IOError) POST_INIT(OSError)#ifdef MS_WINDOWS POST_INIT(WindowsError)#endif#ifdef __VMS POST_INIT(VMSError)#endif POST_INIT(EOFError) POST_INIT(RuntimeError) POST_INIT(NotImplementedError) POST_INIT(NameError) POST_INIT(UnboundLocalError) POST_INIT(AttributeError) POST_INIT(SyntaxError) POST_INIT(IndentationError) POST_INIT(TabError) POST_INIT(LookupError) POST_INIT(IndexError) POST_INIT(KeyError) POST_INIT(ValueError) POST_INIT(UnicodeError)#ifdef Py_USING_UNICODE POST_INIT(UnicodeEncodeError) POST_INIT(UnicodeDecodeError) POST_INIT(UnicodeTranslateError)#endif POST_INIT(AssertionError) POST_INIT(ArithmeticError) POST_INIT(FloatingPointError) POST_INIT(OverflowError) POST_INIT(ZeroDivisionError) POST_INIT(SystemError) POST_INIT(ReferenceError) POST_INIT(MemoryError) POST_INIT(Warning) POST_INIT(UserWarning) POST_INIT(DeprecationWarning) POST_INIT(PendingDeprecationWarning) POST_INIT(SyntaxWarning) POST_INIT(RuntimeWarning) POST_INIT(FutureWarning) POST_INIT(ImportWarning) POST_INIT(UnicodeWarning) PyExc_MemoryErrorInst = BaseException_new(&_PyExc_MemoryError, NULL, NULL); if (!PyExc_MemoryErrorInst) Py_FatalError("Cannot pre-allocate MemoryError instance\n"); Py_DECREF(bltinmod); #if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) /* Set CRT argument error handler */ prevCrtHandler = _set_invalid_parameter_handler(InvalidParameterHandler); /* turn off assertions in debug mode */ prevCrtReportMode = _CrtSetReportMode(_CRT_ASSERT, 0);#endif} void_PyExc_Fini(void){ Py_XDECREF(PyExc_MemoryErrorInst); PyExc_MemoryErrorInst = NULL;#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) /* reset CRT error handling */ _set_invalid_parameter_handler(prevCrtHandler); _CrtSetReportMode(_CRT_ASSERT, prevCrtReportMode);#endif}Lines 2001–2147 of 2147. Previous lines
PRE_INIT(BaseException) PRE_INIT(Exception) PRE_INIT(StandardError) PRE_INIT(TypeError) PRE_INIT(StopIteration) PRE_INIT(GeneratorExit) PRE_INIT(SystemExit) PRE_INIT(KeyboardInterrupt) PRE_INIT(ImportError) PRE_INIT(EnvironmentError) PRE_INIT(IOError) PRE_INIT(OSError) #ifdef MS_WINDOWS PRE_INIT(WindowsError) #endif #ifdef __VMS PRE_INIT(VMSError) #endif PRE_INIT(EOFError) PRE_INIT(RuntimeError) PRE_INIT(NotImplementedError) PRE_INIT(NameError) PRE_INIT(UnboundLocalError) PRE_INIT(AttributeError) PRE_INIT(SyntaxError) PRE_INIT(IndentationError) PRE_INIT(TabError) PRE_INIT(LookupError) PRE_INIT(IndexError) PRE_INIT(KeyError) PRE_INIT(ValueError) PRE_INIT(UnicodeError) #ifdef Py_USING_UNICODE PRE_INIT(UnicodeEncodeError) PRE_INIT(UnicodeDecodeError) PRE_INIT(UnicodeTranslateError) #endif PRE_INIT(AssertionError) PRE_INIT(ArithmeticError) PRE_INIT(FloatingPointError) PRE_INIT(OverflowError) PRE_INIT(ZeroDivisionError) PRE_INIT(SystemError) PRE_INIT(ReferenceError) PRE_INIT(MemoryError) PRE_INIT(Warning) PRE_INIT(UserWarning) PRE_INIT(DeprecationWarning) PRE_INIT(PendingDeprecationWarning) PRE_INIT(SyntaxWarning) PRE_INIT(RuntimeWarning) PRE_INIT(FutureWarning) PRE_INIT(ImportWarning) PRE_INIT(UnicodeWarning) m = Py_InitModule4("exceptions", functions, exceptions_doc, (PyObject *)NULL, PYTHON_API_VERSION); if (m == NULL) return; bltinmod = PyImport_ImportModule("__builtin__"); if (bltinmod == NULL) Py_FatalError("exceptions bootstrapping error."); bdict = PyModule_GetDict(bltinmod); if (bdict == NULL) Py_FatalError("exceptions bootstrapping error."); POST_INIT(BaseException) POST_INIT(Exception) POST_INIT(StandardError) POST_INIT(TypeError) POST_INIT(StopIteration) POST_INIT(GeneratorExit) POST_INIT(SystemExit) POST_INIT(KeyboardInterrupt) POST_INIT(ImportError) POST_INIT(EnvironmentError) POST_INIT(IOError) POST_INIT(OSError) #ifdef MS_WINDOWS POST_INIT(WindowsError) #endif #ifdef __VMS POST_INIT(VMSError) #endif POST_INIT(EOFError) POST_INIT(RuntimeError) POST_INIT(NotImplementedError) POST_INIT(NameError) POST_INIT(UnboundLocalError) POST_INIT(AttributeError) POST_INIT(SyntaxError) POST_INIT(IndentationError) POST_INIT(TabError) POST_INIT(LookupError) POST_INIT(IndexError) POST_INIT(KeyError) POST_INIT(ValueError) POST_INIT(UnicodeError) #ifdef Py_USING_UNICODE POST_INIT(UnicodeEncodeError) POST_INIT(UnicodeDecodeError) POST_INIT(UnicodeTranslateError) #endif POST_INIT(AssertionError) POST_INIT(ArithmeticError) POST_INIT(FloatingPointError) POST_INIT(OverflowError) POST_INIT(ZeroDivisionError) POST_INIT(SystemError) POST_INIT(ReferenceError) POST_INIT(MemoryError) POST_INIT(Warning) POST_INIT(UserWarning) POST_INIT(DeprecationWarning) POST_INIT(PendingDeprecationWarning) POST_INIT(SyntaxWarning) POST_INIT(RuntimeWarning) POST_INIT(FutureWarning) POST_INIT(ImportWarning) POST_INIT(UnicodeWarning) PyExc_MemoryErrorInst = BaseException_new(&_PyExc_MemoryError, NULL, NULL); if (!PyExc_MemoryErrorInst) Py_FatalError("Cannot pre-allocate MemoryError instance\n"); Py_DECREF(bltinmod); #if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) /* Set CRT argument error handler */ prevCrtHandler = _set_invalid_parameter_handler(InvalidParameterHandler); /* turn off assertions in debug mode */ prevCrtReportMode = _CrtSetReportMode(_CRT_ASSERT, 0); #endif } void _PyExc_Fini(void) { Py_XDECREF(PyExc_MemoryErrorInst); PyExc_MemoryErrorInst = NULL; #if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) /* reset CRT error handling */ _set_invalid_parameter_handler(prevCrtHandler); _CrtSetReportMode(_CRT_ASSERT, prevCrtReportMode); #endif }