home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / Kludges.subproj / ObjectError.h < prev    next >
Encoding:
Text File  |  1994-08-03  |  1.5 KB  |  54 lines

  1. // ObjectError.h
  2. // 
  3. // Original class by:
  4. // Bill Bumgarner, Andrew Stone, Mike Morton, and Julie Zalenski
  5. //
  6. /* (Rohit Khare 8/4/94 added this note:)
  7. silent
  8. printf "[%s %s]\n", ((*(int *)($sp + 4)) ? ((struct Object *)*($sp + 4))->isa->name : "nil"), sel_getName((unsigned)*($sp + 8))
  9. cont
  10. end
  11. */
  12. //
  13. // A class that poses as object and does crash-reporting.
  14. // Catches terminating signals (ie seg faults, bus errors)
  15. // and fatal Objective-C runtime errors and writes a backtrace 
  16. // out to the console using some shady hacks.  This could be modified
  17. // to write backtrace to a file, mail message, etc... if desired.
  18. //
  19. // Modified by Ivo Rothschild (ivo@hasc.ca) to try to continue
  20. //            when muddling on.
  21. //
  22. // Use at own Risk (so sayeth the authors).
  23. //
  24. // NO WARRANTY:
  25. // ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 
  26. // IS HEREBY DISCLAIMED.  IN NO EVENT WILL THE AFOREMENTIONED PARTIES BE LIABLE 
  27. // FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL 
  28. // DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THIS CODE.
  29. //
  30.  
  31. #import <objc/Object.h>
  32.  
  33. @interface ObjectError:Object
  34. {
  35.     // No Ivars
  36. }
  37.  
  38. + setup;
  39. + setMuddleOn:(BOOL)flag;
  40. + setSignalHandler:(void (*)())handler;
  41. + resumeHandlingCrashes;
  42. + stopHandlingCrashes;
  43. + printFunctionFromFP:(void *)framePointer;
  44. + printMethodFromFP:(void *)framePointer;
  45. + printBacktrace;
  46. + dumpBacktrace:(const char *)message;
  47.  
  48. - error:(const char *)aString, ...;
  49. + error:(const char *)aString, ...;
  50.  
  51. + tryToContinue;
  52.  
  53. @end
  54.