dsahlberg-apache-org commented on PR #9: URL: https://github.com/apache/serf/pull/9#issuecomment-3029254790
> > Maybe this is the same question already asked by Brane, and I'm just not clever enough to understand it. But the whole design seems a little bit convoluted to me. Why not have something similar to what OpenSSL seems to do: When a Serf function return non-success, it is possible for the caller to call something in Serf "Give me the first error". This could then be done repeatedly in case there are more than 1 error. In the case of OpenSSL errrors, that function could be just a wrapper around OpenSSL's ERR_get_error(). > > The problem with that approach is that it "keeps stock". > > What you want is to hand over the errors you encounter with the least effort possible. Right now in a trivial implementation you could just write the errors to stderr from inside the callback. No copying, no saving state anywhere, you're done. > > Subversion is more sophisticated, it has the ability to stack errors. This lines up nicely where the callback can add an additional error to the stack. Thanks (to both Brane and Graham) for their explanations. It makes sense... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@serf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org