it is around CURL_async_get intentionally to cover any other C-style API, which, in general case, you dont know the implementstion details. I mentioned at one point that this way you build unoptimized API, causing multiple unneeded allocations, implying building CURL wrapper targetting senders would be better.
Regarding error reporting - CURL API never fails, new is nothrow + assert, so it never fails too, start has no need to hndle exceptions since there are zero
I don't see how it's the case that "[the] CURL API never fails." It can fail to allocate, it can fail to resolve DNS, it can fail to connect to the remote host, the remote host can send it a corrupt response...
Ah, I dint update the article code (github version is nothrow). The intention was to basically have noexcept CURL_async_get() for simplicity. You are right, will add a point of everything noexcept. Introducing errors handling adds another layer of complexity. I planned to have this discussed separately, but it's too much
View all comments
Show parent comment
1
u/grishavanika Sep 20 '26
it is around CURL_async_get intentionally to cover any other C-style API, which, in general case, you dont know the implementstion details. I mentioned at one point that this way you build unoptimized API, causing multiple unneeded allocations, implying building CURL wrapper targetting senders would be better.
Regarding error reporting - CURL API never fails, new is nothrow + assert, so it never fails too, start has no need to hndle exceptions since there are zero