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 20, 2016
1 parent f88b14c commit acc5804
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Frameworks/CoreFoundationAdditions/_NSCFTemporaryRootObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,21 @@
//******************************************************************************
#include "_NSCFTemporaryRootObject.h"

#include <Windows.h>

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

abort();
}
@end

0 comments on commit acc5804

Please sign in to comment.