News for hackers. Stuff that matters.
Re:The future of Clang-based tooling by otherjason on Saturday July 29, 2023 @05:19PM (#36924750)
Aborting (as in calling abort(3)) inside a library is very problematic if I’m writing an application that uses it. It takes away the ability of the larger application to detect and handle the error, simply terminating the entire process. Especially in a C++ library, something like exception throwing is better than an immediate abort, because the application can at least catch the exception and proceed. Exceptions are admittedly a controversial subject, but are easier to utilize inside potentially deeply nested call stacks where explicit error reporting would otherwise complicate the API.

There are no comments on this comment yet.