mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
closes bpo-39262: Use specific out-of-memory message in _sharedexception_bind. (GH-17908)
This commit is contained in:
parent
2c7ed417a4
commit
5cae042f68
1 changed files with 4 additions and 2 deletions
|
@ -221,8 +221,9 @@ _sharedexception_bind(PyObject *exctype, PyObject *exc, PyObject *tb)
|
|||
if (err->name == NULL) {
|
||||
if (PyErr_ExceptionMatches(PyExc_MemoryError)) {
|
||||
failure = "out of memory copying exception type name";
|
||||
} else {
|
||||
failure = "unable to encode and copy exception type name";
|
||||
}
|
||||
failure = "unable to encode and copy exception type name";
|
||||
goto finally;
|
||||
}
|
||||
|
||||
|
@ -237,8 +238,9 @@ _sharedexception_bind(PyObject *exctype, PyObject *exc, PyObject *tb)
|
|||
if (err->msg == NULL) {
|
||||
if (PyErr_ExceptionMatches(PyExc_MemoryError)) {
|
||||
failure = "out of memory copying exception message";
|
||||
} else {
|
||||
failure = "unable to encode and copy exception message";
|
||||
}
|
||||
failure = "unable to encode and copy exception message";
|
||||
goto finally;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue