static PyObject *py_mod_bt2_exc_try_again_type = NULL;
static PyObject *py_mod_bt2_exc_stop_type = NULL;
static PyObject *py_mod_bt2_exc_msg_iter_canceled_type = NULL;
static PyObject *py_mod_bt2_exc_try_again_type = NULL;
static PyObject *py_mod_bt2_exc_stop_type = NULL;
static PyObject *py_mod_bt2_exc_msg_iter_canceled_type = NULL;
py_mod_bt2_exc_error_type =
PyObject_GetAttrString(py_mod_bt2, "Error");
BT_ASSERT(py_mod_bt2_exc_error_type);
py_mod_bt2_exc_error_type =
PyObject_GetAttrString(py_mod_bt2, "Error");
BT_ASSERT(py_mod_bt2_exc_error_type);
py_mod_bt2_exc_try_again_type =
PyObject_GetAttrString(py_mod_bt2, "TryAgain");
BT_ASSERT(py_mod_bt2_exc_try_again_type);
py_mod_bt2_exc_try_again_type =
PyObject_GetAttrString(py_mod_bt2, "TryAgain");
BT_ASSERT(py_mod_bt2_exc_try_again_type);
log_exception_and_maybe_append_error(BT_LOG_WARNING, true,
self_component_class, self_component,
self_message_iterator, module_name);
log_exception_and_maybe_append_error(BT_LOG_WARNING, true,
self_component_class, self_component,
self_message_iterator, module_name);
- status = __BT_FUNC_STATUS_ERROR;
+
+ if (PyErr_GivenExceptionMatches(exc,
+ py_mod_bt2_exc_memory_error)) {
+ status = __BT_FUNC_STATUS_MEMORY_ERROR;
+ } else {
+ status = __BT_FUNC_STATUS_ERROR;
+ }