home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / Utilities / Fiend-1.4.1-src / HKCrashTrap.h < prev    next >
Encoding:
Text File  |  1994-11-21  |  1.4 KB  |  51 lines

  1. //
  2. // HKCrashTrap   version 1.0
  3. //
  4. // Based on ObjectError
  5. // Original class by:
  6. // Bill Bumgarner, Andrew Stone, Mike Morton, and Julie Zalenski
  7. //
  8. // Modifications by:
  9. // Ivo Rothschild (ivo@hasc.ca)
  10. // 
  11. // A class that poses as object and does crash-reporting.
  12. // Catches terminating signals (ie seg faults, bus errors)
  13. // and fatal Objective-C runtime errors and writes a backtrace 
  14. // out to the console using some shady hacks.  This could be modified
  15. // to write backtrace to a file, mail message, etc... if desired.
  16. //
  17. //
  18. // You may freely copy, distribute, and reuse the code in this class.
  19. //
  20. // NO WARRANTY:
  21. // ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 
  22. // IS HEREBY DISCLAIMED.  IN NO EVENT WILL THE AFOREMENTIONED PARTIES BE LIABLE 
  23. // FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL 
  24. // DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THIS CODE.
  25. //
  26.  
  27. #import <objc/Object.h>
  28.  
  29. @interface HKCrashTrap:Object
  30. {
  31.     // No Ivars
  32. }
  33.  
  34. + setup;
  35. + setContinueAfterError:(BOOL)flag;
  36. + (BOOL)continueAfterError;
  37. + setSignalHandler:(void (*)())handler;
  38. + resumeHandlingCrashes;
  39. + stopHandlingCrashes;
  40. + printFunctionFromFP:(void *)framePointer;
  41. + printMethodFromFP:(void *)framePointer;
  42. + printBacktrace;
  43. + dumpBacktrace:(const char *)message;
  44.  
  45. - error:(const char *)aString, ...;
  46. + error:(const char *)aString, ...;
  47.  
  48. + tryToContinue;
  49.  
  50. @end
  51.