bpo-39882: Add _Py_FatalErrorFormat() function (GH-19157)
diff --git a/Objects/call.c b/Objects/call.c
index 37d079d..0861414 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -46,7 +46,8 @@
"%s returned NULL without setting an error",
where);
#ifdef Py_DEBUG
- /* Ensure that the bug is caught in debug mode */
+ /* Ensure that the bug is caught in debug mode.
+ Py_FatalError() logs the SystemError exception raised above. */
Py_FatalError("a function returned NULL without setting an error");
#endif
return NULL;
@@ -67,7 +68,8 @@
"%s returned a result with an error set", where);
}
#ifdef Py_DEBUG
- /* Ensure that the bug is caught in debug mode */
+ /* Ensure that the bug is caught in debug mode.
+ Py_FatalError() logs the SystemError exception raised above. */
Py_FatalError("a function returned a result with an error set");
#endif
return NULL;