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:
Eric Snow 2024-04-03 10:58:39 -06:00 committed by GitHub
parent 7ecd55d604
commit 976bcb2379
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 40 additions and 23 deletions

View file

@ -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;
}