kuzudb / kuzu

Embeddable property graph database management system built for query speed and scalability. Implements Cypher.
https://kuzudb.com/
MIT License
1.07k stars 77 forks source link

Better exception annotations for C++ API #3391

Open mewim opened 2 weeks ago

mewim commented 2 weeks ago

For current C++ APIs, it is not quite clear which functions may throw an exception and which functions do not throw. It also causes some issue for the client API bindings. It’s less of an issue for Python as pybind11 automatically converts C++ exceptions to Python exceptions, but for Java and C API bindings, it is not very clear which functions needs a try-catch and which ones does not, which may cause exceptions not caught and crash user’s process. We should consider systematically assess and annotate which API functions may throw. If it may throw, we should add an annotation to the docstring. Otherwise, we should mark it as noexcept.