PGERRORS.H

Go to the documentation of this file.
00001 
00002 /*  $Id: PGERRORS.H 414 2005-01-24 02:50:53Z terry_teague $    */
00003 
00004 /* This header file defines "generic" errors.
00005 
00006 12/10/93 -- Codes have been #idef'd for platform-specific errors.
00007 
00008 DataPak Software, Inc.  Copyright 1993-1994.        */
00009 
00010 /* Some compilers (Symantic) treat hex constants as unsigned thus making certain error comparisons fail
00011     corrected by hard typing 6 Jan 1994 by T.R. Shaw, OITC, Paige Board Member */
00012 
00013 
00014 #ifndef PGERRORS_H
00015 #define PGERRORS_H
00016 
00017 #include "CPUDEFS.H"
00018 
00019 #ifndef NO_ERROR
00020 #define NO_ERROR                0x0000      /* No error */
00021 #endif
00022 
00023 #ifdef MAC_PLATFORM
00024 
00025 #if !TARGET_API_MAC_CARBON
00026 #include <MacErrors.h>      /* 2004-09-29 AR: renamed from errors.h */
00027 #endif
00028 
00029 /* Memory errors */
00030 
00031 #define NO_MEMORY_ERR           memFullErr   /* Insufficient memory */
00032 #define NIL_ADDRESS_ERR         nilHandleErr /* Address is NIL (not valid) */
00033 
00034 /* Paige-specific memory management and exception handler errors:  */
00035 
00036 #define NOT_ENOUGH_PURGED_ERR   (pg_error)0x0101        /* Cannot purge enough space */
00037 #define NO_PURGE_FILE_ERR       (pg_error)0x0102        /* Purge file not available */
00038 #define LOCKED_BLOCK_ERR        (pg_error)0x0103        /* Cannot resize locked block */
00039 #define BAD_ADDRESS_ERR         (pg_error)0x0104        /* Address is bogus (not valid) */
00040 #define BAD_LINK_ERR            (pg_error)0x0105        /* Something wrong with internal ref */
00041 #define CHECKSUM_ERR            (pg_error)0x0200        /* Memory_ref checksum error */
00042 #define ACCESS_ERR              (pg_error)0x0201        /* Access failed on memory_ref */
00043 #define BAD_REF_ERR             (pg_error)0x0202        /* Bogus memory_ref */
00044 #define REF_DISPOSED_ERR        (pg_error)0x0203        /* Memory_ref has been disposed */
00045 #define FILE_PURGE_ERR          (pg_error)0x0204        /* Error on file when purging */
00046 #define FILE_UNPURGE_ERR        (pg_error)0x0205        /* Error on reading purged file */
00047 #define RANGE_ERR               (pg_error)0x0206        /* Access out of range */
00048 #define PURGED_MEMORY_ERR       (pg_error)0x0207        /* Attempt to operate on a purged block */
00049 #define DEBUG_ZERO_ERR          (pg_error)0x0208        /* Access is zero debug check */
00050 #define DEBUG_NZ_ERR            (pg_error)0x0209        /* Access is non-zero debug check */
00051 #define NO_ERR_HANDLER_ERR      (pg_error)0x020A        /* No exception handler */
00052 #define PG_PSTRING_TOO_BIG_ERR  (pg_error)0x020B        /* Memory ref conversion to Pascal string error */
00053 #define BAD_PAIGE_VERSION_ERR   (pg_error)0x0210        /* Incorrect PAIGE version for operaration */
00054 #define PROGRAM_BUG_ASSERT      (pg_error)0x0211        /* Used for general assertion */
00055 
00056 /* File I/O Errors */
00057 
00058 #define NO_SPACE_ERR            dskFulErr               /* File mediem has insufficient space */
00059 #define NOT_OPEN_ERR            fnOpnErr                /* Requested file not open */
00060 #define FILE_LOCK_ERR           fLckdErr                /* File is locked (somehow) */
00061 #define WRITE_PROTECT_ERR       wPrErr                  /* Medium is write protected */
00062 #define ACCESS_DENIED_ERR       permErr                 /* Access permission denied */
00063 #define EOF_ERR                 eofErr                  /* Attempt to go past end of file */
00064 #define IO_ERR                  ioErr                   /* Hard I/O Error */
00065 #define NO_FILE_ERR             fnfErr                  /* File not found */
00066 
00067 /* Paige-specific file errors: */
00068 
00069 #define NO_HANDLER_ERR          (pg_error)0x0300        /* A key handler not found */
00070 #define BAD_TYPE_ERR            (pg_error)0x0301        /* File not of appropriate type */
00071 #define UNICODE_ERR             (pg_error)0x0309        /* File contains unicode and this platform cannot handle */
00072 #define SOFT_EOF_ERR            (pg_error)0x03FF        /* Logical end of file "error" */
00073 
00074 /* Other Paige errors: */
00075 
00076 #define LLIST_ERR               (pg_error)0x03FC        /* Linked List is invalid */
00077 #define DUP_PG_REF_ERR          (pg_error)0x03FD        /* Duplicate entry on pgAddSection */
00078 
00079 #define USER_CANCELLED_ERR      userCanceledErr
00080 
00081 #define RESOURCE_NOT_FOUND      resNotFound             /* Attempt to access a non existant resource */
00082 
00083 #define UNKNOWN_ERR             (pg_error)0x7FFF        /* Unknown error that Paige cannot understand */
00084 
00085 #endif
00086 
00087 #ifdef WINDOWS_PLATFORM
00088 
00089 #include <stdio.h>
00090 #include <errno.h>
00091 
00092 
00093 #ifndef EACCES
00094 #define EACCES                  (pg_error)0x0305
00095 #endif
00096 
00097 #ifndef EIO
00098 #define EIO                     (pg_error)0x0307
00099 #endif
00100 
00101 /* CHANGE APPROPRIATE TYPES TO OS-SPECIFIC ERROR CODES  */
00102 
00103 
00104 #define NO_MEMORY_ERR           (pg_error)0x0100        /* Insufficient memory */
00105 #define NOT_ENOUGH_PURGED_ERR   (pg_error)0x0101        /* Cannot purge enough space */
00106 #define NO_PURGE_FILE_ERR       (pg_error)0x0102        /* Purge file not available */
00107 #define LOCKED_BLOCK_ERR        (pg_error)0x0103        /* Cannot resize locked block */
00108 #define NIL_ADDRESS_ERR         (pg_error)0x0104        /* Address is NIL (not valid) */
00109 #define BAD_ADDRESS_ERR         (pg_error)0x0105        /* Address is bogus (not valid) */
00110 #define BAD_LINK_ERR            (pg_error)0x0106        /* Something wrong with internal ref */
00111 
00112 /* Paige memory_ref-specific errors */
00113 
00114 #define CHECKSUM_ERR            (pg_error)0x0200        /* Memory_ref checksum error */
00115 #define ACCESS_ERR              (pg_error)0x0201        /* Access failed on memory_ref */
00116 #define BAD_REF_ERR             (pg_error)0x0202        /* Bogus memory_ref */
00117 #define REF_DISPOSED_ERR        (pg_error)0x0203        /* Memory_ref has been disposed */
00118 #define FILE_PURGE_ERR          (pg_error)0x0204        /* Error on file when purging */
00119 #define FILE_UNPURGE_ERR        (pg_error)0x0205        /* Error on reading purged file */
00120 #define RANGE_ERR               (pg_error)0x0206        /* Access out of range */
00121 #define PURGED_MEMORY_ERR       (pg_error)0x0207        /* Attempt to operate on a purged block */
00122 #define DEBUG_ZERO_ERR          (pg_error)0x0208        /* Access is zero debug check */
00123 #define DEBUG_NZ_ERR            (pg_error)0x0209        /* Access is non-zero debug check */
00124 #define NO_ERR_HANDLER_ERR      (pg_error)0x020A        /* No exception handler */
00125 #define PG_PSTRING_TOO_BIG_ERR  (pg_error)0x020B        /* Memory ref conversion to Pascal string error */
00126 #define BAD_PAIGE_VERSION_ERR   (pg_error)0x0210        /* Incorrect PAIGE version for operaration */
00127 #define PROGRAM_BUG_ASSERT      (pg_error)0x0211        /* Used for general assertion */
00128 
00129 /* File I/O Errors */
00130 
00131 #define NO_HANDLER_ERR          (pg_error)0x0300        /* A key handler not found */
00132 #define NO_SPACE_ERR            (pg_error)0x0301        /* File has insufficient space */
00133 #define NOT_OPEN_ERR            (pg_error)0x0302        /* Requested file not open */
00134 #define FILE_LOCK_ERR           (pg_error)0x0303        /* File locked */
00135 #define WRITE_PROTECT_ERR       (pg_error)0x0304        /* Medium write-protected */
00136 #define ACCESS_DENIED_ERR       (pg_error)EACCES        /* Access permission denied */
00137 #define EOF_ERR                 (pg_error)EOF           /* Attempt to go past end of file */
00138 #define IO_ERR                  (pg_error)EIO           /* Hard I/O Error */
00139 #define BAD_TYPE_ERR            (pg_error)0x0308        /* File not of appropriate type */
00140 #define UNICODE_ERR             (pg_error)0x0309        /* File contains unicode and this platform cannot handle */
00141 #define NO_FILE_ERR             (pg_error)0x03FE        /* File not found */
00142 #define SOFT_EOF_ERR            (pg_error)0x03FF        /* Logical end of file "error" */
00143 
00144 /* Other Paige errors: */
00145 
00146 #define USER_CANCELLED_ERR      (pg_error)(-128)
00147 
00148 #define LLIST_ERR               (pg_error)0x03FC        /* Linked List is invalid */
00149 #define DUP_PG_REF_ERR          (pg_error)0x03FD        /* Duplicate entry on pgAddSection */
00150 
00151 #ifdef WIN16_COMPILE
00152 #define RESOURCE_NOT_FOUND      (pg_error)0x0500        /* Attempt to access a non existant resource */
00153 #else
00154 #define RESOURCE_NOT_FOUND      (pg_error)ERROR_RESOURCE_DATA_NOT_FOUND
00155 #endif
00156 
00157 #define UNKNOWN_ERR             (pg_error)0x7FFF        /* Unknown error that Paige cannot understand */
00158 
00159 #endif
00160 
00161 /* Runtime debugging errors (not memory manager related): */
00162 
00163 #define LOCKED_PG_ERROR         (pg_error)0x0400        /* Attempt to change a locked pg_ref */
00164 #define ILLEGAL_RE_ENTER_ERROR  (pg_error)0x0401        /* Illegal re-entrance */
00165 #define BAD_PARAM_ERROR         (pg_error)0x0402        /* Bad parameter in a function */
00166 #define GLOBALS_MISMATCH_ERROR  (pg_error)0x0403        /* Globals in doc do not match pg_globals */
00167 #define DUP_KEY_HANDLER_ERROR   (pg_error)0x0404        /* pgWrite/Read a key that already has a handler */
00168 #define BAD_REFCON_ID_ERROR     (pg_error)0x0405        /* Bad refcon num for exclusion/containers */
00169 #define STRUCT_INTEGRITY_ERR    (pg_error)0x0406        /* Style structures bad */
00170 #define USER_BREAK_ERR          (pg_error)0x0407        /* User-invoked debug break */
00171 #define CARET_SYNC_ERR          (pg_error)0x0408        /* Caret and caret bit out of sync */
00172 
00173 #endif

Generated on Wed May 31 18:19:59 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6