ftp.nice.ch/pub/next/developer/resources/classes/CrashTrap.1.0.NIHS.bs.tar.gz#/CrashTrap.v1.0/Source/AppDelegate.m

This is AppDelegate.m in view mode; [Download] [Up]

//
//  Demo for HKCrashTrap
//
// By ivo  ivo@hasc.ca

#import "AppDelegate.h"
#import "HKCrashTrap.h"

@implementation AppDelegate

- appDidInit:sender
{
	[window makeKeyAndOrderFront:self];
	return self;
}

- afterCrashMatrixHit:sender
{
	[HKCrashTrap setContinueAfterError:([[sender selectedCell] tag]?NO:YES)];
    return self;
}

- nullCrashHit:sender;
{
	char *p = NULL;
	fprintf(stderr,"About to crash referencing a NULL ptr.\n");
	*p = 1;
    return self;
}

- unimplementedCrashHit:sender;
{
#warning The following 'does not repond to' warning is intentional! 
	[self callSomethingNotImplemented];   // Make me crash!!!
    return self;
}

- freedObjectCrashHit:sender;
{
	id o;
	
	o = [[Object alloc] init];
	[o free];
	[o hash];
	return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.