- 4.51.1.24. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types
4.51.1.24. ogErrorCode type
4.51.1.24. ogErrorCode type
Targets: MS-DOS, Win32 console
ObjGfx40 Unit
The ogErrorCode enumerated type is used to reflect errros that occurred while
performing critical operations. All non-critical functions in ObjGfx (e.g. ogSetPixel(),
ogLine(), ogCopy(), et al), are designed to "fail quietly", which means that if an operation isn't
possible it won't occur. All critical functions (e.g. ogCreate(), ogAlias(), ogClone()) will return
TRUE/FALSE depending on whether they were successful. In the event a critical function failed
and appropiate error checking did not occur (i.e. bail out on error) then all future operations
should resolve without a crash.
- ogOk: No error
- ogMemAllocFail: Memory allocation failed
- ogAlreadyOwner: ogAlias() returns this when the surface has memory allocated already
- ogNoSurface: ogClone() returns this when the object attempting to be cloned doesn't have a surface to clone
- ogNoPalette: An operation requiring the palette has failed because the palette was not allocated
- ogBadBPP: The surface doesn't support the requested BPP. Valid values are 8, 15, 16, 24, and 32.
- ogSourceOutOfBounds: The operation requires the source coordinates to be valid
- ogDestOutofBounds: The operation requires the dest coordinates to be valid
- ogFileNotFound: File not found
- ogFileReadError: The requested amount to read from the file does not match the actual amount read
- ogFileWriteError: The requested amount to write from the file does not match the actual amount written
- ogNoLFB: A linear frame buffer cannot be established (only relevant in MS-DOS mode)
- ogNoCloning: The surface type (e.g. ogDisplay) doesn't support cloning
- ogNoAliasing: The surface type (e.g. ogDisplay) doesn't support aliasing
- ogNoModeSupport: There was no mode available that matched the desired resolution
- ogSetCooperativeLevelFail: Trying to set the cooperative level of the directX window failed (only relevant in Win32 mode)
- ogSurfaceCreationFail: Trying to create a directDraw surface failed (only relevant in Win32 mode)
- ogGetAttachedSurfaceFail: Attempting to get the attached surface failed (only relevant in Win32 mode)
- ogSurfaceLockFail: Attempting to lock the directDraw surface failed (only relevant in Win32 mode)
Declaration:
type
ogErrorCode =
(ogOk,
ogMemAllocFail,
ogAlreadyOwner,
ogNoSurface,
ogNoPalette,
ogBadBPP,
ogSourceOutOfBounds,
ogDestOutOfBounds,
ogFileNotFound,
ogFileReadError,
ogFileWriteError,
ogNoLFB,
ogNoCloning,
ogNoAliasing,
ogNoModeSupport,
ogBadWindowHandle,
ogSetCooperativeLevelFail,
ogSurfaceCreationFail,
ogGetAttachedSurfaceFail,
ogSurfaceLockFail
);
See Also:
- 4.51.1.24. -