/* * Unpublished Confidential Information of * Information Technology Solutions, Inc. Do not disclose. * Copyright (c) Information Technology Solutions, Inc., 1995. * Copyright (c) WhiteLight Systems, Inc, 1993-1995. * All Rights Reserved. * * 500 West Madison, Suite 2210, Chicago, IL 60661 * 312-474-7700 312-474-9361 (Fax) info@its.com * * Author: Charles Swiger * Purpose: This header file contains the published external types for * CrashCatcher. * * $Id: CCTypes.h,v 1.1.1.1 2003/04/24 08:21:02 chuck Exp $ */ /***************************** * External type definitions * *****************************/ /* Returned by CrashCatcher's +CC_reportContext method. A context ID * indicates what part of a report CrashCatcher is currently generating. * Consult the CrashCatcherTypes.rtf document for additional information. */ typedef enum { CC_Inactive, // normal state between errors CC_PreProcessTrigger, CC_InHeader, CC_AfterHeader, CC_MethodTarget, // these two will repeat for each level CC_MethodArgument, // of the stack backtrace CC_EndOfReport, CC_PostProcessTrigger, CC_FinalCleanup } CC_ContextID; // this is used to tag the state of an object typedef enum { OBJ_OK, OBJ_NIL, OBJ_BAD_ID, OBJ_BAD_ISA, OBJ_FREED, OBJ_BAD_NAME, OBJ_CRPT_METHODS } OBJ_ValidationIdentifier; /* * Trigger Defined Types */ // State Report Destinations #define SRD_Default 0x00000000L // Use the global defaults #define SRD_UnixMail 0x00000001L // Use unix mail (non-interactive) #define SRD_MailApp 0x00000002L // Use NeXT''s Mail.app (interactive) #define SRD_AppendToFile 0x00000004L // Append to file #define SRD_OverwriteFile 0x00000008L // Overwrite the file #define SRD_Stderr 0x00000010L // Display on stderr or console #define SRD_None 0x00000020L // No destination; discard report // Note that one can combine destinations, as so: #define SRD_Normal (SRD_UnixMail | SRD_Stderr) // the normal configuration // CrashCatcher behavior typedef enum { TB_Default = 0, // Use the default behavior set by global calls TB_Ignore, // Ignore the trigger; return with no report produced TB_Return, // Return after trigger is processed TB_Restart, // Jump the main event loop after trigger processing TB_Exit, // Exit after trigger is processed TB_Abort, // Abort after trigger is processed } TriggerBehavior; // Trigger severity level typedef enum { TS_Unknown = 0, // The severity of the trigger is unknown TS_Info, // Just request state information, presumably non-fatal TS_Warning, // A warning, presumably non-fatal TS_Error, // Normally this trigger would be fatal to the app // unless otherwise configured by the developer.... } TriggerSeverity; // Known trigger types typedef enum { TT_Unknown = 0, // Unknown trigger type TT_UnixSignal, // This trigger was caused by a ...Unix Signal TT_FreedObject, // ... message sent to freed object TT_ObjcError, // ... +/- error method sent to an object TT_Assert, // ... failed assertion made by the developer TT_MachException, // ... Mach Port Exception TT_NXException, // ... uncaught NEXTSTEP NXException TT_NSException, // ... uncaught NEXTSTEP NXException TT_RunTimeError, // ... a runtime problem such as NXMallocCheck() TT_Developer, // ... Developer Trigger TT_ThirdParty, // ... Third Party Product (libraries?) } TriggerType; /* CrashCatcher debugging levels. * These are a set of bitfield flags which control whether CrashCatcher * outputs diagnostic information to stderr (or to the console, if run from * a NEXTSTEP app started by the Workspace). */ #define D_None 0x00000000L // No debugging information displayed #define D_Basic 0x00000001L // Basic info about what CC is doing #define D_Report 0x00000002L // Info about SRD's & behaviors #define D_Trigger 0x00000004L // Info about trigger states #define D_Backtrace 0x00000008L // General info about frames on the bt #define D_Frame 0x00000010L // Detailed info about each frame #define D_Args 0x00000020L // Very detailed info about each arg #define D_Free 0x00000040L // Info about freed objects #define D_NORMAL 0x00000007L // useful level of information #define D_ALL 0x0000007fL // enable all debugging /* This is the prototype for functions that may act as signal handlers. * Consult "man 3 signal" for additional documentation. */ typedef void (*SigHandlerProc) (int signal); // Provide backwards compatibility with the old header files. #ifndef _CRASHCATCHER_H #define _CRASHCATCHER_H #warning Compatibility header file included, use #import #import #endif