Kaydet (Commit) 9c4742e6 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

more specific exception for wrong kind of raise #8082

üst 5da7e7ce
......@@ -3539,8 +3539,9 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb)
/* Not something you can raise. You get an exception
anyway, just not what you specified :-) */
PyErr_Format(PyExc_TypeError,
"exceptions must be classes or instances, not %s",
type->ob_type->tp_name);
"exceptions must be old-style classes or "
"derived from BaseException, not %s",
type->ob_type->tp_name);
goto raise_error;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment