mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-76785: Raise InterpreterError, Not RuntimeError (gh-117489)
I had meant to switch everything to InterpreterError when I added it a while back. At the time I missed a few key spots. As part of this, I've added print-the-exception to _PyXI_InitTypes() and fixed an error case in `_PyStaticType_InitBuiltin().
This commit is contained in:
parent
7ecd55d604
commit
976bcb2379
8 changed files with 40 additions and 23 deletions
|
|
@ -1073,7 +1073,7 @@ int
|
|||
_PyInterpreterState_FailIfRunningMain(PyInterpreterState *interp)
|
||||
{
|
||||
if (interp->threads.main != NULL) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
PyErr_SetString(PyExc_InterpreterError,
|
||||
"interpreter already running");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue