Closed nlfiedler closed 5 years ago
Thanks for the question @nlfiedler,
The error
argument can be set in the event of an asynchronous operating error, for example see the Execute
method in DeduplicationWorker
in binding.cc
.
Exceptions are thrown in the event of programmer error, for example when arguments have the wrong type or when any part of the interface contract is broken by the user.
Exceptions indicate a programming bug.
Callback errors indicate an operational error.
I see, thanks, I didn't realize that when I was looking at the code.
So the callback is given an
error
argument, but it is never set. Instead, the library throws exceptions. Why is that the case? And thank you for writing this useful library.