3 ms·
There is no catch in your example. I thought the point was that in C++, preserving the stack trace when having caught an exception is rather non-trivial. Excep
by anyfoo 8y ago
There is no catch in your example. I thought the point was that in C++, preserving the stack trace when having caught an exception is rather non-trivial.
Exceptions that don't get caught usually allow you to get the stack trace through a crash report/core dump/whatever, but then there's not much difference between an uncaught exception and a plain abort().
- edflsafoiewq 8y agoYes, I said "if you don't catch them you always get a full stack trace". The comparison was between returning error values and exceptions, not between exceptions and abort. The difference is with abort is of course that once you are alerted to the error by seeing it be uncaught, you can insert an appropriate handler for it. A file-open function can throw on file not found but I will not very happy if it aborts.
- anyfoo 8y agoAh, after reading the full thread, that is actually what you said, and I don't really know what the point of the commenter you replied to was, now...