objectbox/objectbox-python

C-API return error handling

vaind opened this issue · 1 comments

vaind commented

Error codes returned from the C-API (type obx_err) are currently ignored, see e.g. Box::is_empty() calling obx_box_is_empty(). C function obx_box_is_empty() returns error code, which, if not zero, should raise an exception with the error text.

As an example, see functions in helpers.dart and how it's used in dart's Box::isEmpty()

This issue should have been fixed at the earliest in b468606 and is currently implemented via ctypes func.errcheck Callback.
Could you please close this issue as fixed?