home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Error Codes
- *
- */
-
- /*
- * Each of these error codes has an associated message. If possible,
- * your modules or hook should use these error codes. For example,
- * if your hook cannot work on greyscale images, you can do:
- *
- * SetError(ERR_MustBeColor);
- * Error();
- * return(FALSE);
- *
- * This provides a consistent error reporting scheme. If you need
- * to show your own error message but still need to set an error code,
- * you can do this:
- *
- * Errorf("The fudge is not chocolate!");
- * SetError(ERR_UserCancel);
- * return(FALSE);
- *
- * ImageFX does not display a requester for the ERR_UserCancel error code.
- *
- */
-
- enum ERR_Tag
- {
- ERR_Error = 512, /* Some kinda error */
- ERR_ChipMem, /* Out of chip memory */
- ERR_Memory, /* Out of public memory */
- ERR_Open, /* Cannot open file */
- ERR_Screen, /* Cannot open screen */
- ERR_Window, /* Cannot open window */
-
- /* Library Errors: */
- ERR_NoIntuit, /* Cannot open Intuition.library */
- ERR_NoGfx, /* Cannot open Gfx.library */
- ERR_NoHame, /* Cannot open Hame.library */
- ERR_NoArp, /* Cannot open Arp.library */
-
- /* IFF Errors */
- ERR_NotIFF, /* Not on IFF File */
- ERR_BadIFF, /* IFF is mangled */
-
- /* ILBM Errors */
- ERR_NotILBM, /* IFF is not an ILBM */
- ERR_Depth0, /* Image depth is 0 */
- ERR_Depth6, /* Image depth > 6 */
- ERR_Depth24, /* Image depth not 24-bit */
-
- /* Misc Errors */
- ERR_NoHEInit, /* HAME_Init() failed */
- ERR_DiffBM, /* Bitmaps are different */
-
- ERR_LastError, /* User errors begin here */
-
- /*
- * Basically just indicators.
- */
- ERR_UserCancel = 2001, /* user cancelled operation */
- ERR_AtBoundary, /* at buffer boundary */
- ERR_NOP, /* nothing to do */
- ERR_UserHalt, /* user halted macro */
- ERR_dummy02,
- ERR_dummy03,
- ERR_dummy04,
- ERR_dummy05,
- ERR_dummy06,
-
- /*
- * Arexx- and command processing-specific errors.
- */
- ERR_BadCommand, /* unknown command */
- ERR_BadArgs, /* invalid arguments */
- ERR_dummy10,
- ERR_dummy11,
- ERR_dummy12,
- ERR_dummy13,
- ERR_dummy14,
- ERR_dummy15,
- ERR_dummy16,
- ERR_dummy17,
- ERR_dummy18,
- ERR_dummy19,
-
- /*
- * Other error codes.
- */
- ERR_NoSerial, /* cannot open serial device */
- ERR_NoBuffer, /* no image buffer to work on */
- ERR_MustBeColor, /* image must be color */
- ERR_MustBeGrey, /* image must be grey */
- ERR_NotOnDisk, /* cannot process disk buffer */
- ERR_BadFileType, /* unknown file type */
- ERR_NoPalette, /* no palette in file */
- ERR_NotOnRegion, /* cannot be done to region */
- ERR_ClipEmpty, /* clipboard empty */
- ERR_NoImage, /* no image in file */
- ERR_NeedAlpha, /* need an alpha channel */
- ERR_NeedBrush, /* need a brush to work with */
- ERR_NeedRegion, /* need a region defined */
- ERR_NoIffParse, /* iffparse.library not found */
- ERR_ModOpenFail, /* module open failed */
- ERR_VmemDisabled, /* virtual memory disabled */
- ERR_VmemFull, /* virtual memory device full */
- ERR_MaxBufSize, /* max buf size is 32768x32768 */
- ERR_Write, /* write error */
- ERR_Read, /* read error */
- ERR_BadDepth, /* bad image depth */
- ERR_UnknownForm, /* unknown form of image file */
- ERR_HookFailed, /* hook program failed */
- ERR_NotOnBrush, /* cannot perform op on brush */
- ERR_NotOnExternal, /* cannot perform on external image */
- ERR_SysNotFound, /* system module not found */
- ERR_HookNotFound, /* hook program not found */
- ERR_LibNotFound, /* library not found or failed to open */
- ERR_NeedSwap, /* this operation requires a swap buffer */
- ERR_VmemMemory, /* unable to allocate vmem RAM buffer */
-
- ERR_MaxError
- };
-
- /*
- * Handy macros:
- */
- #define ReturnError(x,v) { SetError((x)); return ((v)); }
- #define GotoError(x,L) { SetError((x)); goto L; }
-
-