Skip to content

Commit

Permalink
fix: resolve #66
Browse files Browse the repository at this point in the history
  • Loading branch information
akornich committed Apr 15, 2021
1 parent 56970e7 commit 5cae263
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Demos/macosAppObjC/macosAppObjC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@import RollbarNotifier;

//@import RollbarKSCrash;
@import RollbarKSCrash;
@import RollbarPLCrashReporter;

__attribute__((noinline)) static void crashIt (void) {
Expand Down Expand Up @@ -55,14 +55,14 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {

// now, cause a crash:

//[self callTroublemaker];
//@throw NSInternalInconsistencyException;
//[self performSelector:@selector(die_die)];
//[self performSelector:NSSelectorFromString(@"crashme:") withObject:nil afterDelay:10];
//assert(NO);
//exit(0);
//crashIt();

[self callTroublemaker];
@throw NSInternalInconsistencyException;
[self performSelector:@selector(die_die)];
[self performSelector:NSSelectorFromString(@"crashme:") withObject:nil afterDelay:10];
assert(NO);
exit(0);
crashIt();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ +(void)initialize {

// Configure our reporter:
PLCrashReporterSignalHandlerType signalHandlerType =
//#if !TARGET_OS_TV
//#if !TARGET_OS_SIMULATOR
// PLCrashReporterSignalHandlerTypeMach;
// NOTE: looking at comments around the PLCRASH_FEATURE_MACH_EXCEPTIONS
// definition in PLCrashReporter and matching it with actual experiences
// on the current Apple OSs releases we should only use
// the PLCrashReporterSignalHandlerTypeBSD option for now.
// Leaving the alternative commented out for the reference in the future.
//#if PLCRASH_FEATURE_MACH_EXCEPTIONS
// PLCrashReporterSignalHandlerTypeMach;
//#else
PLCrashReporterSignalHandlerTypeBSD;
PLCrashReporterSignalHandlerTypeBSD;
//#endif

PLCrashReporterConfig *config =
[[PLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
symbolicationStrategy: PLCrashReporterSymbolicationStrategyAll
Expand Down

0 comments on commit 5cae263

Please sign in to comment.