This is HKCrashTrap.h in view mode; [Download] [Up]
//
// HKCrashTrap version 1.0
//
// Based on ObjectError
// Original class by:
// Bill Bumgarner, Andrew Stone, Mike Morton, and Julie Zalenski
//
// Modifications by:
// Ivo Rothschild (ivo@hasc.ca)
//
// A class that poses as object and does crash-reporting.
// Catches terminating signals (ie seg faults, bus errors)
// and fatal Objective-C runtime errors and writes a backtrace
// out to the console using some shady hacks. This could be modified
// to write backtrace to a file, mail message, etc... if desired.
//
//
// You may freely copy, distribute, and reuse the code in this class.
//
// NO WARRANTY:
// ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
// IS HEREBY DISCLAIMED. IN NO EVENT WILL THE AFOREMENTIONED PARTIES BE LIABLE
// FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THIS CODE.
//
#import <objc/Object.h>
@interface HKCrashTrap:Object
{
// No Ivars
}
+ setup;
+ setContinueAfterError:(BOOL)flag;
+ (BOOL)continueAfterError;
+ setSignalHandler:(void (*)())handler;
+ resumeHandlingCrashes;
+ stopHandlingCrashes;
+ printFunctionFromFP:(void *)framePointer;
+ printMethodFromFP:(void *)framePointer;
+ printBacktrace;
+ dumpBacktrace:(const char *)message;
- error:(const char *)aString, ...;
+ error:(const char *)aString, ...;
+ tryToContinue;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.