Skip to content

Commit

Permalink
Use RaiseFailFastException before abort() to generate an exception re…
Browse files Browse the repository at this point in the history
…cord.
  • Loading branch information
DHowett committed Jul 21, 2016
1 parent f88b14c commit a8a1587
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Frameworks/CoreFoundationAdditions/_NSCFTemporaryRootObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@
//******************************************************************************
#include "_NSCFTemporaryRootObject.h"

#include <Windows.h>

@implementation _NSCFTemporaryRootObject
- (void)doesNotRecognizeSelector:(SEL)selector {
// According to the reference platform documentation, this method must never return.
abort();
EXCEPTION_RECORD record{
EXCEPTION_NONCONTINUABLE_EXCEPTION,
EXCEPTION_NONCONTINUABLE,
nullptr,
nullptr,
0,
{0}
};
RaiseFailFastException(&record, nullptr, FAIL_FAST_GENERATE_EXCEPTION_ADDRESS);
}
@end
@end

0 comments on commit a8a1587

Please sign in to comment.