Core Graphics Data Types and Constants Reference

Declared in
CGError.h

Overview

This document describes assorted constants and result codes related to Core Graphics and Quartz 2D.

Data Types

CGError

A uniform type for result codes returned by functions in Core Graphics and Quartz 2D.

typedef int32_t CGError;
Availability
  • Available in OS X v10.0 and later.
Declared In
CGError.h

Result Codes

This table lists the result codes returned by functions in Core Graphics and Quartz 2D.

Result CodeValueDescription
kCGErrorSuccess 0

The requested operation was completed successfully.

Available in OS X v10.0 and later.

kCGErrorFailure 1000

A general failure occurred.

Available in OS X v10.0 and later.

kCGErrorIllegalArgument 1001

One or more of the parameters passed to a function are invalid. Check for NULL pointers.

Available in OS X v10.0 and later.

kCGErrorInvalidConnection 1002

The parameter representing a connection to the window server is invalid.

Available in OS X v10.0 and later.

kCGErrorInvalidContext 1003

The CPSProcessSerNum or context identifier parameter is not valid.

Available in OS X v10.0 and later.

kCGErrorCannotComplete 1004

The requested operation is inappropriate for the parameters passed in, or the current system state.

Available in OS X v10.0 and later.

kCGErrorNameTooLong 1005

A parameter, typically a C string, is too long to be used without truncation.

Available in OS X v10.0 through OS X v10.7.

kCGErrorNotImplemented 1006

Return value from obsolete function stubs present for binary compatibility, but not normally called.

Available in OS X v10.0 and later.

kCGErrorRangeCheck 1007

A parameter passed in has a value that is inappropriate, or which does not map to a useful operation or value.

Available in OS X v10.0 and later.

kCGErrorTypeCheck 1008

A data type or token was encountered that did not match the expected type or token.

Available in OS X v10.0 and later.

kCGErrorNoCurrentPoint 1009

An operation relative to a known point or coordinate could not be done, as there is no known point.

Available in OS X v10.0 through OS X v10.7.

kCGErrorInvalidOperation 1010

The requested operation is not valid for the parameters passed in, or the current system state.

Available in OS X v10.0 and later.

kCGErrorNoneAvailable 1011

The requested operation could not be completed as the indicated resources were not found.

Available in OS X v10.0 and later.

kCGErrorApplicationRequiresNewerSystem1015

The application requires a newer version of the operating system to run than is currently available.

Available in OS X v10.2 through OS X v10.7.

kCGErrorApplicationNotPermittedToExecute1016

The application is not permitted to run.

Available in OS X v10.2 through OS X v10.7.

kCGErrorApplicationIncorrectExecutableFormatFound1023

The application does not have any executable code for the current system.

Available in OS X v10.3 through OS X v10.7.

kCGErrorApplicationIsLaunching1024

The application is in the process of launching but has not yet checked in with the window server.

Available in OS X v10.3 through OS X v10.7.

kCGErrorApplicationAlreadyRunning1025

The application being launched was already running and checked in with the window server.

Available in OS X v10.3 through OS X v10.7.

kCGErrorApplicationCanOnlyBeRunInOneSessionAtATime1026

The application being launched is incompatible with multiple user sessions and is already running in another user session.

Available in OS X v10.3 through OS X v10.7.

kCGErrorClassicApplicationsMustBeLaunchedByClassic1027

The window server could not launch the application. It must be launched by the Classic environment.

Available in OS X v10.4 through OS X v10.7.

kCGErrorForkFailed1028

The system was unable to fork a new process to launch the application.

Available in OS X v10.4 through OS X v10.7.

kCGErrorRetryRegistration1029

The application should retry its registration shortly.

Available in OS X v10.5 through OS X v10.7.