Staging
v0.5.1
https://github.com/python/cpython
Revision 98b6246c0c60f2831b0c7a66d8c0659ebac1ec32 authored by Barry Warsaw on 14 September 1998, 18:51:11 UTC, committed by Barry Warsaw on 14 September 1998, 18:51:11 UTC
initialization of class exceptions.  Specifically:

init_class_exc(): This function now returns an integer status of the
class exception initialization.  No fatal errors in this method now.
Also, use PySys_WriteStderr() when writing error messages.  When an
error occurs in this function, 0 is returned, but the partial creation
of the exception classes is not undone (this happens elsewhere).

Things that could trigger the fallback:

    - exceptions.py fails to be imported (due to syntax error, etc.)

    - one of the exception classes is missing (e.g. due to library
      version mismatch)

    - exception class can't be inserted into __builtin__'s dictionary

    - MemoryError instance can't be pre-allocated

    - some other PyErr_Occurred

newstdexception(): Changed the error message.  This is still a fatal
error because if the string based exceptions can't be created, we
really can't continue.

initerrors(): Be sure to xdecref the .exc field, which might be
non-NULL if class exceptions init was aborted.

_PyBuiltin_Init_2(): If class exception init fails, print a warning
message and reinstate the string based exceptions.
1 parent d24d3fc
History
Tip revision: 98b6246c0c60f2831b0c7a66d8c0659ebac1ec32 authored by Barry Warsaw on 14 September 1998, 18:51:11 UTC
Several changes that Python carry on in the face of errors in the
Tip revision: 98b6246
File Mode Size
BeOS
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
Tools
.hgtags -rw-r--r-- 1.2 KB
Makefile.in -rw-r--r-- 17.3 KB
README -rw-r--r-- 36.1 KB
acconfig.h -rw-r--r-- 2.7 KB
config.h.in -rw-r--r-- 10.3 KB
configure -rwxr-xr-x 118.0 KB
configure.in -rw-r--r-- 18.8 KB
install-sh -rwxr-xr-x 2.2 KB

README

back to top