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 iOS 2.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 iOS 2.0 and later.

kCGErrorFailure 1000

A general failure occurred.

Available in iOS 2.0 and later.

kCGErrorIllegalArgument 1001

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

Available in iOS 2.0 and later.

kCGErrorInvalidConnection 1002

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

Available in iOS 2.0 and later.

kCGErrorInvalidContext 1003

The CPSProcessSerNum or context identifier parameter is not valid.

Available in iOS 2.0 and later.

kCGErrorCannotComplete 1004

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

Available in iOS 2.0 and later.

kCGErrorNameTooLong 1005

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorNotImplemented 1006

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

Available in iOS 2.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 iOS 2.0 and later.

kCGErrorTypeCheck 1008

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

Available in iOS 2.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 iOS 2.0 through iOS 5.1.

kCGErrorInvalidOperation 1010

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

Available in iOS 2.0 and later.

kCGErrorNoneAvailable 1011

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

Available in iOS 2.0 and later.

kCGErrorApplicationRequiresNewerSystem1015

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorApplicationNotPermittedToExecute1016

The application is not permitted to run.

Available in iOS 2.0 through iOS 5.1.

kCGErrorApplicationIncorrectExecutableFormatFound1023

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorApplicationIsLaunching1024

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorApplicationAlreadyRunning1025

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorApplicationCanOnlyBeRunInOneSessionAtATime1026

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorClassicApplicationsMustBeLaunchedByClassic1027

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorForkFailed1028

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

Available in iOS 2.0 through iOS 5.1.

kCGErrorRetryRegistration1029

The application should retry its registration shortly.

Available in iOS 2.0 through iOS 5.1.