3 ms·
Why not throw exceptions, and just never use try/catch? That way, all exceptions are uncaught and should terminate the program, in a way that takes advantage of
by Karellen 4y ago
Why not throw exceptions, and just never use try/catch? That way, all exceptions are uncaught and should terminate the program, in a way that takes advantage of the programming language's native error reporting facilities.
- hsn915 4y agoassertion failures terminate the program immediately. exceptions usually trigger cleanup code. If your cleanup code is mostly closing files and clearing memory, then it's useless because the OS will do that for your crashed program anyway.