ftp.nice.ch/pub/next/developer/resources/classes/CrashTrap.1.0.NIHS.bs.tar.gz#/CrashTrap.v1.0/ReadMe.rtf

This is ReadMe.rtf in view mode; [Download] [Up]

		HKCrashTrap
		-----------
	Based on ObjectError by: Bill Bumgarner,
							 Andrew Stone, 
							 Mike Morton, and 
							 Julie Zalenski)
	Modified by:	Ivo Rothschild ivo@hasc.ca
		
		
WHAT IT IS:
		
HKCrashTrap is a class which can help in debugging an app by reporting on crashes.  When enabled, this class catches terminating signals (ie seg faults, bus errors) and fatal Objective-C runtime errors and writes a backtrace out to the console.  It can also be set to continue after a crash by jumping back into the main event loop.  This can give users the opportunity to save their work.  

HKCrashTrap is based on the class ObjectError.  OjectError was written by a number of people - see above for the list. 

HKCrashTrap is available on the archives and will also be bundled with the HASCKit object library coming soon from the Hutchison Avenue Software Corp. (info@hasc.ca)

HOW TO USE IT:

To use HKCrashTrap in your own apps, add the following line(s) in the ?_main.m file for your project:

	[HKCrashTrap setup];
	[HKCrashTrap setContinueAfterError:YES];  // optional.
	
right before the line:

	[Application new];

Don't forget to turn off the "Generate Main File On Save" in ProjectBuilder (under Attributes) so that the main file does not get overwritten.


WHERE IT WORKS:

This class has been tested for NEXTSTEP 3.2 on Motorola and Intel.  Earlier versions for these architectures may or may not work.  (It should probably work under 3.x.)  It probably does not work properly on HP PA/RISC but has not been tested.


DIFFERENCES FROM ObjectError:

Aside from the name change of the class and one of the methods (+setMuddleOn: becomes +setContinueAfterError:), this class now traps memory allocation related errors such as sending methods to freed objects.  A bug in the "continue after crash" feature has also been fixed.


RIGHTS:

You may freely copy, distribute, and reuse the code in HKCrashTrap.


SUGGESTIONS / IMPROVEMENTS:

There is no support for this object but if you have any suggestions, comments or have made any improvements, I'd like to hear about them.
Send email to:   ivo@hasc.ca


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