summaryrefslogtreecommitdiffstats
path: root/Lib/plat-linux1
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-09-14 18:51:11 (GMT)
committerBarry Warsaw <barry@python.org>1998-09-14 18:51:11 (GMT)
commit98b6246c0c60f2831b0c7a66d8c0659ebac1ec32 (patch)
tree791103c11cac7411bbe9a370a10e4c30d84196a8 /Lib/plat-linux1
parentd24d3fcd03d2396eb5cc7524246183b661c4113e (diff)
downloadcpython-98b6246c0c60f2831b0c7a66d8c0659ebac1ec32.zip
cpython-98b6246c0c60f2831b0c7a66d8c0659ebac1ec32.tar.gz
cpython-98b6246c0c60f2831b0c7a66d8c0659ebac1ec32.tar.bz2
Several changes that Python carry on in the face of errors in the
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.
Diffstat (limited to 'Lib/plat-linux1')
0 files changed, 0 insertions, 0 deletions