event: Don't suppress coroutine exceptions in optimized builds

This commit is contained in:
rdb 2021-02-26 11:44:50 +01:00
parent 7e0c770dcd
commit 6a51709332

View File

@ -85,7 +85,6 @@ PythonTask(PyObject *func_or_coro, const std::string &name) :
*/
PythonTask::
~PythonTask() {
#ifndef NDEBUG
// If the coroutine threw an exception, and there was no opportunity to
// handle it, let the user know.
if (_exception != nullptr && !_retrieved_exception) {
@ -98,7 +97,6 @@ PythonTask::
_exc_value = nullptr;
_exc_traceback = nullptr;
}
#endif
Py_XDECREF(_function);
Py_DECREF(_args);