>>47-49
No genius, you never call abort() directly; you assert() to verify the arguments.
Really? Tell me more.
abort() is caught by debuggers giving you a stack trace, and for QA testers it's extremely easy to write your own replacement to throw up a dialog or output debug info and stop execution.
How is it easier than catching the exception, writing down all the information you can for debugging and showing an error dialog?
You can't gather debug information *AT ALL* from exceptions. They don't even have a stack trace. Sepples exceptions are *entirely useless* for debugging.
http://www.ibm.com/developerworks/linux/library/l-cppexcep.html
On the other hand, you can replace abort() to take __LINE__ and __FILE__, and you'll know exactly what's wrong locally (and there are platform-specific tools to run through the linked-list on the stack; if you include a debug symbol table for your QA builds you can easily get a full stack trace out of it). This also works in and across C code, not just sepples bullshit.
You can do that with exceptions too with an equal amount of work. It also means you'll be using a C++ facility instead of a C workaround in C++!
That's why exceptions exist in the first place: to replace assert() and abort() with an alternative which can provide more information.
And most importantly, debuggers halt on SIGABRT, so you can easily investigate the call stack interactively (as opposed to your app dying due to an uncaught (or worse, caught with ...) exception, and setting up your debugger to catch specific exception types, and trying to replicate it and stepping through all the ones you aren't interested in...)
You don't have the appropriate tools to develop with C++ if that's a problem.
Everyone in the industry used abort() and assert() in C++ because:
a) Most people didn't bother to learn to use them and carried over their C habits.
b) Everyone who bothered had been bitten by poor compiler support (at the time)
c) No tools
Again: abort() and assert() were used instead as a
workaround.
Today all those points are moot but somehow everyone sticks to the notion that C++ exceptions aren't worth using because they aren't Java exceptions.
C++ exceptions don't have the features of Java exceptions but they're heaps better than the C workaround you're using.
You know what's sad? You probably mean well but you're stuck with people who don't know any better. We wouldn't have this argument if Sepples wasn't a pile of pre-standard legacy code, bad practices and emergent features (i.e. a humongous pile of shit). It's a fucking mess stretched over the years.