Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Python/crossinterp_exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ static PyTypeObject _PyExc_InterpreterNotFoundError = {
};
PyObject *PyExc_InterpreterNotFoundError = (PyObject *)&_PyExc_InterpreterNotFoundError;

/* NotShareableError extends ValueError */
/* NotShareableError extends TypeError */

static int
_init_notshareableerror(exceptions_t *state)
{
const char *name = "interpreters.NotShareableError";
// XXX Inherit from TypeError.
PyObject *base = PyExc_ValueError;
PyObject *base = PyExc_TypeError;
PyObject *ns = NULL;
PyObject *exctype = PyErr_NewException(name, base, ns);
if (exctype == NULL) {
Expand Down Expand Up @@ -94,7 +93,7 @@ _ensure_notshareableerror(PyThreadState *tstate,
}
}
else {
exctype = PyExc_ValueError;
exctype = PyExc_TypeError;
}
_PyErr_SetObject(tstate, exctype, msgobj);
// We have to set the context manually since _PyErr_SetObject() doesn't.
Expand Down
Loading