diff options
author | Fred Drake <fdrake@acm.org> | 2001-10-05 21:50:08 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-10-05 21:50:08 (GMT) |
commit | bb9fa21cfe7a8343698ce5e26e845b4e0c877d6a (patch) | |
tree | 9229be0a614d194fa49a58acdaf9cdee29e47778 /Python | |
parent | 39c785108f1acddb70930edf023825f935aa640e (diff) | |
download | cpython-bb9fa21cfe7a8343698ce5e26e845b4e0c877d6a.zip cpython-bb9fa21cfe7a8343698ce5e26e845b4e0c877d6a.tar.gz cpython-bb9fa21cfe7a8343698ce5e26e845b4e0c877d6a.tar.bz2 |
weakref.ReferenceError becomes a built-in exception now that weak ref objects
are moving into the core; with these changes, it will be possible for the
exception to be raised without the weakref module ever being imported.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/exceptions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c index ef9d01c..4d17529 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -97,6 +97,7 @@ Exception\n\ | | |\n\ | | +-- UnicodeError\n\ | |\n\ + | +-- ReferenceError\n\ | +-- SystemError\n\ | +-- MemoryError\n\ |\n\ @@ -889,6 +890,9 @@ Please report this to the Python maintainer, along with the traceback,\n\ the Python version, and the hardware/OS platform and version."; static char +ReferenceError__doc__[] = "Weak ref proxy used after referent went away."; + +static char MemoryError__doc__[] = "Out of memory."; static char @@ -956,6 +960,7 @@ PyObject *PyExc_NotImplementedError; PyObject *PyExc_SyntaxError; PyObject *PyExc_IndentationError; PyObject *PyExc_TabError; +PyObject *PyExc_ReferenceError; PyObject *PyExc_SystemError; PyObject *PyExc_SystemExit; PyObject *PyExc_UnboundLocalError; @@ -1044,6 +1049,7 @@ static struct { FloatingPointError__doc__}, {"ValueError", &PyExc_ValueError, 0, ValueError__doc__}, {"UnicodeError", &PyExc_UnicodeError, &PyExc_ValueError, UnicodeError__doc__}, + {"ReferenceError", &PyExc_ReferenceError, 0, ReferenceError__doc__}, {"SystemError", &PyExc_SystemError, 0, SystemError__doc__}, {"MemoryError", &PyExc_MemoryError, 0, MemoryError__doc__}, /* Warning categories */ |