At shutdown (initiated by an UPS) my application crashes and a messagebox appears.
The text in the messagebox is \"The exception unknown software exception (0x40000
Yes, 0x40000015 means STATUS_FATAL_APP_EXIT. Your app causes an unhandled runtime exception during shutdown. Some runtime exceptions are actually handled if you don't handle them yourself, and some of these default handlers call abort()
. By default, abort
calls:
_call_reportfault(_CRT_DEBUGGER_ABORT, STATUS_FATAL_APP_EXIT, EXCEPTION_NONCONTINUABLE);
abort
is a generic termination - it doesn't know what specific exception prompted it to be called, hence the generic 'unknown software exception' message.
One path to abort is via the _purecall exception - calling an unimplemented pure virtual call.
Gleaned from purevirt.c and abort.c in the Visual Studio\VC\crt\src directory.
MSDN has documentation on overriding the default pure call exception handler.
Here are some related questions: