negentropy
negentropy copied to clipboard
Improve error handling
Summary
Enhances error handling in Negentropy C++ wrapper and Nim bindings for Waku Sync. Replaces boolean-based error reporting with system-generated error messages.
Key Changes
- Added thread-local
lastErrorstring andget_last_error()function in C++. - Updated C++ functions to set specific error messages.
- Enhanced Nim bindings to use a new error reporting mechanism.
Hi! Did you see my comment here? https://github.com/hoytech/negentropy/pull/9#issuecomment-2351157808
In short, I moved the C language wrapper stuff into a new directory c/ to keep a clean separation between the C++ and the bindings. So, this PR will not merge cleanly (but it's probably just a matter of using the new directory structure).