objectbox / objectbox-python

Superfast on-device object & vector database for Python
https://objectbox.io/
Apache License 2.0
119 stars 18 forks source link

C-API return error handling #6

Closed vaind closed 2 years ago

vaind commented 4 years ago

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()

mytlogos commented 3 years ago

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