negentropy icon indicating copy to clipboard operation
negentropy copied to clipboard

Improve error handling

Open darshankabariya opened this issue 1 year ago • 1 comments

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 lastError string and get_last_error() function in C++.
  • Updated C++ functions to set specific error messages.
  • Enhanced Nim bindings to use a new error reporting mechanism.

darshankabariya avatar Oct 08 '24 10:10 darshankabariya

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

hoytech avatar Oct 08 '24 13:10 hoytech