Skip to content

Commit 3906702

Browse files
committed
Replace "on" with "when"
1 parent bd7e424 commit 3906702

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

Modules/_datetimemodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ clear_current_module(PyInterpreterState *interp, PyObject *expected)
226226
goto finally;
227227

228228
error:
229-
PyErr_FormatUnraisable("Exception ignored on clearing _datetime module");
229+
PyErr_FormatUnraisable("Exception ignored when clearing _datetime module");
230230

231231
finally:
232232
PyErr_SetRaisedException(exc);

Modules/_testcapi/watchers.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ allocate_too_many_code_watchers(PyObject *self, PyObject *args)
428428
PyObject *exc = PyErr_GetRaisedException();
429429
for (int i = 0; i < num_watchers; i++) {
430430
if (PyCode_ClearWatcher(watcher_ids[i]) < 0) {
431-
PyErr_FormatUnraisable("Exception ignored on "
431+
PyErr_FormatUnraisable("Exception ignored when "
432432
"clearing code watcher");
433433
break;
434434
}
@@ -610,7 +610,7 @@ allocate_too_many_func_watchers(PyObject *self, PyObject *args)
610610
PyObject *exc = PyErr_GetRaisedException();
611611
for (int i = 0; i < num_watchers; i++) {
612612
if (PyFunction_ClearWatcher(watcher_ids[i]) < 0) {
613-
PyErr_FormatUnraisable("Exception ignored on "
613+
PyErr_FormatUnraisable("Exception ignored when "
614614
"clearing function watcher");
615615
break;
616616
}
@@ -757,7 +757,7 @@ allocate_too_many_context_watchers(PyObject *self, PyObject *args)
757757
PyObject *exc = PyErr_GetRaisedException();
758758
for (int i = 0; i < num_watchers; i++) {
759759
if (PyContext_ClearWatcher(watcher_ids[i]) < 0) {
760-
PyErr_FormatUnraisable("Exception ignored on "
760+
PyErr_FormatUnraisable("Exception ignored when "
761761
"clearing context watcher");
762762
break;
763763
}

Modules/_winapi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ overlapped_dealloc(OverlappedObject *self)
177177
PyErr_SetString(PyExc_PythonFinalizationError,
178178
"I/O operations still in flight while destroying "
179179
"Overlapped object, the process may crash");
180-
PyErr_FormatUnraisable("Exception ignored on deallocating "
180+
PyErr_FormatUnraisable("Exception ignored when deallocating "
181181
"overlapped operation %R", self);
182182
}
183183
else {

Modules/atexitmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ atexit_callfuncs(struct atexit_state *state)
110110
PyObject *copy = PyList_GetSlice(state->callbacks, 0, PyList_GET_SIZE(state->callbacks));
111111
if (copy == NULL)
112112
{
113-
PyErr_FormatUnraisable("Exception ignored on "
113+
PyErr_FormatUnraisable("Exception ignored when "
114114
"copying atexit callbacks");
115115
return;
116116
}

Modules/overlapped.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ Overlapped_dealloc(OverlappedObject *self)
759759
PyExc_RuntimeError,
760760
"%R still has pending operation at "
761761
"deallocation, the process may crash", self);
762-
PyErr_FormatUnraisable("Exception ignored on deallocating "
762+
PyErr_FormatUnraisable("Exception ignored when deallocating "
763763
"overlapped operation %R", self);
764764
}
765765
}

Modules/signalmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ _PyErr_CheckSignalsTstate(PyThreadState *tstate)
18371837
PyErr_Format(PyExc_OSError,
18381838
"Signal %i ignored due to race condition",
18391839
i);
1840-
PyErr_FormatUnraisable("Exception ignored on "
1840+
PyErr_FormatUnraisable("Exception ignored when "
18411841
"calling signal handler");
18421842
continue;
18431843
}

Objects/dictobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7351,7 +7351,7 @@ PyObject_ClearManagedDict(PyObject *obj)
73517351
if (set_or_clear_managed_dict(obj, NULL, true) < 0) {
73527352
/* Must be out of memory */
73537353
assert(PyErr_Occurred() == PyExc_MemoryError);
7354-
PyErr_FormatUnraisable("Exception ignored on "
7354+
PyErr_FormatUnraisable("Exception ignored when "
73557355
"clearing an object managed dict");
73567356
/* Clear the dict */
73577357
PyDictObject *dict = _PyObject_GetManagedDict(obj);

Objects/weakrefobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ PyObject_ClearWeakRefs(PyObject *object)
10421042
PyObject *tuple = PyTuple_New(num_weakrefs * 2);
10431043
if (tuple == NULL) {
10441044
_PyWeakref_ClearWeakRefsNoCallbacks(object);
1045-
PyErr_FormatUnraisable("Exception ignored on clearing object weakrefs");
1045+
PyErr_FormatUnraisable("Exception ignored when clearing object weakrefs");
10461046
PyErr_SetRaisedException(exc);
10471047
return;
10481048
}

Python/jit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ _PyJIT_Free(_PyExecutorObject *executor)
563563
executor->jit_side_entry = NULL;
564564
executor->jit_size = 0;
565565
if (jit_free(memory, size)) {
566-
PyErr_FormatUnraisable("Exception ignored on freeing JIT memory");
566+
PyErr_FormatUnraisable("Exception ignored when freeing JIT memory");
567567
}
568568
}
569569
}

0 commit comments

Comments
 (0)