KCMS Application Developer's Guide

Chapter 6 Warning and Error Messages

In This Chapter

This chapter describes the warning and error messages returned by the KCMS "C" API.

Every API function returns warning and error messages in a status code (in KcsStatusId) to indicate whether it executed successfully or, if it did not, why it failed. If a function successfully executes, it returns the KCS_SUCCESS status code. If a function is cancelled before its completion, it returns the KCS_OPERATION_CANCELLED status code. Any other returned status code indicates a problem. This chapter describes each warning and error message and provides information on localizing the messages.

The status codes are defined in /usr/openwin/include/kcms/kcsstats.h.

Warnings

A returned status code in the range KCS_WARNINGS_START to KCS_WARNINGS_END indicates a warning. Table 6-1 describes the warning constants that the C API functions return.

Table 6-1 Warning Codes

Enumerated Warning Constant 

Description 

KCS_WARNINGS_START

The beginning of the defined warnings. 

KCS_ATTR_LARGE_CT_SUPPLIED

Attribute count supplied field was unexpectedly large. 

KCS_CANNOT_DEOPTIMIZE

Original data not available so optimization cannot be changed. 

KCS_CANNOT_OPTIMIZE

This profile cannot be optimized. 

KCS_OPERATION_CANCELLED

This operation was cancelled by the application's user. 

KCS_SPEC_CMM_NOT_FOUND

Specified CMM was not found. 

KCS_TRUNCATED

The buffer you supplied was too small. Therefore, the data in it was truncated. 

KCS_WARNINGS_END

Marks end of KcsStatusId warnings currently defined.

Errors

A returned status code in the range KCS_ERRORS_START to KCS_ERRORS_END indicates a call error. Table 6-2 describes the error messages returned by the C API.

Table 6-2 Error Codes

Enumerated Error Constant 

Description 

General Failures:

KCS_ERRORS_START

Beginning of errors. 

KCS_NOT_AVAILABLE

KCMS has not been installed or is not available. 

 

 

Memory:

KCS_MEM_ALLOC_ERR

Memory allocation error.

OS: 

KCS_OS_ERR

General OS error.

IO:

KCS_IO_READ_ERR

Read error. 

KCS_IO_WRITE_ERR

Write error. 

KCS_IO_SEEK_ERR

Seek error. 

KCS_IO_UNKNOWN_TYPE_ERR

An unknown KcsProfileDesc type entry was found.

Solaris File: 

 

KCS_SOLARIS_FILE_NOT_OPENED

Cannot open profile. 

KCS_SOLARIS_FILE_RO

Cannot open profile for writing.  

KCS_SOLARIS_FILE_LOCKED

Profile is locked by another process. 

KCS_SOLARIS_FILE_NAME_NULL

Filename pointer is NULL.

X11 Profile:

 

KCS_X11_DATA_NULL

Display or visual pointer is NULL.

KCS_X11_PROFILE_NOT_LOADED

Cannot load profile; may be locked or does not exist. 

KCS_X11_PROFILE_RO

Remote X11 profiles are read only. 

Profile:

KCS_PROF_ID_BAD

Invalid profile ID. 

KCS_PROF_FORMAT_BAD

Profile format error. 

KCS_PROF_CT_EXCEEDS_PROF_LIST

Number of profiles on list is smaller than argument count. 

KCS_PROF_INCOMPLETE

Incomplete profile specified. 

KCS_PROF_NO_DATA_SUPPORT_4_REQUEST

 

KCS_PROF_REQ_ATTRS_INCOMPLETE

 

 

Attributes:

KCS_ATTR_NAME_OUT_OF_RANGE

Specified attribute is out of range. 

KCS_ATTR_TYPE_UNKNOWN

Attribute type supplied by user is not known. 

KCS_ATTR_LOAD_FORMAT_INCORRECT

The format of the attribute does not match specifications upon loading. 

KCS_ATTR_LOAD_FLOAT_ERR

Error interpreting a float upon loading. 

KCS_ATTR_LOAD_INT_ERR

Error interpreting an integer upon loading. 

KCS_ATTR_DATE_TIME_FORMAT

The format of the date time stamp does not match specifications. 

KCS_ATTR_CT_ZERO_OR_NEG

The count supplied in KcsAttributeValue was zero or negative.

KCS_ATTR_READ_ONLY

Attempting to set an attribute that is read only. 

Connection:

KCS_CONNECT_FAILED

Pair of profiles could not be connected. 

KCS_CONNECT_PRECISION_UNACCEPTABLE

Profile connect will result in unacceptable precision. 

KCS_CONNECT_OPT_FORCED_DATA_LOSS

The last optimization forced the KCMS framework to remove some data necessary for this operation. 

KCS_CONNECT_PROFILES_CT_ERR

The operation requires a different number of profiles in the list than supplied. 

KCS_CONNECT_QUANT_MISMATCH

Mismatch between the quantization of a pair of profiles. 

KCS_CONNECT_UNIMP_OP

Connect operation is unimplemented. 

 

Validation:

KCS_MISMATCHED_WHITEPOINTS

Profile white points did not match during validation. 

KCS_MISMATCHED_BLACKPOINTS

Profile black points did not match during validation. 

KCS_MISMATCHED_COLORSPACES

Profile color spaces did not match during validation. 

KCS_MISMATCHED_DIMENSIONS

Profile dimensions did not match during validation. 

KCS_MISMATCHED_VERSIONS

Profile versions did not match during validation. 

Layout:

KCS_LAYOUT_INVALID

Invalid pixel layout. 

KCS_LAYOUT_UNSUPPORTED

Unsupported pixel layout. 

KCS_LAYOUT_MISMATCH

Pixel layouts do not match profile input and output specifications. 

Evaluation:

KCS_EVAL_TOO_MANY_CHANNELS

More channels specified in the pixel layout structure than the profile supports. 

KCS_EVAL_BUFFER_OVERFLOW

Caller's buffer too small. 

KCS_EVAL_ONLY_ONE_OP_ALLOWED

KcsEvaluate only supports one operation at a time, (KcsForward). 

Characterization/Calibration:

KCS_CC_UPDATE_NEEDS_MORE_DATA

Data supplied is inadequate. 

KCS_CC_UPDATE_INVALID_DATA

Data supplied is invalid. 

KCS_CC_INCORRECT_COLOR_SPACE

Characterization/calibration data contains incorrect color space. 

KCS_CC_NUM_COMPS_OUT_OF_RANGE

Characterization/calibration data contains incorrect number of I/O components. 

KCS_CC_TOO_FEW_MEASUREMENTS

Not enough measurements to support calibrating or characterizing this device. 

KCS_CC_TABLE_DATA_BAD

Table data is out of range. 

KCS_CC_INCORRECT_DEV_TYPE

KcsAttributeDevType is incorrect. 

KCS_CC_INCORRECT_ATTR_CLASS

KcsAttributeClass is incorrect. 

KCS_CC_CANNOT_CAL_DEV_TYPE

Device type cannot be calibrated. 

KCS_CC_CANNOT_CHAR_DEV_TYPE

Device type cannot be characterized. 

KCS_CC_INPUT_NOT_RAMP

Currently data must be a ramp. 

Color Management Module:

KCS_CMM_RTLOAD_FAILED

Runtime loading of CMM failed. 

KCS_CMM_MAJOR_VERSION_MISMATCH

Incompatible CMM major version number. 

KCS_CMM_MINOR_VERSION_MISMATCH

Incompatible CMM minor version number. 

KCS_CMM_UNKNOWN_TECHNOLOGY

CMM requested could not be found. 

KCS_CMM_UNKNOWN_RUNTIME_TYPE

CMM associated with this profile could not be found. 

KCS_CMM_UNSUPPORTED_OP

Operation not supported by this CMM. 

Unimplemented Features:

KCS_UNIMP_NESTED_CONNECTIONS

Currently, KCMS cannot handle nested connections. 

KCS_UNIMP_TOO_MANY_PROFILES

Profile array contains too many profiles. 

KCS_UNIMP_ILLEGAL_TECHNOLOGY

When connecting profiles, one CMM technology is incompatible with another CMM technology. (Very rare with standard ICC profile format.) 

Internal:

KCS_INTERNAL_CLASS_CORRUPTED

Internal error related to one of the KCMS classes. 

KCS_INTERNAL_DATA_CORRUPTED

Internal error related to one of the KCMS data. 

IO: 

KCS_HOSTNAME_ERROR

Host name unknown (not local or remote). 

Localizing Status Messages

The KCMS library warning and error codes are internationalized. Your application can convert KcsStatusId into a text string with the KcsGetLastError() function (defined on "KcsGetLastError()"). It calls the appropriate setup functions to convert a message to the appropriate language. A translation table also must exist. The translatable KCMS .po files are kcs_strings.po and kcssolmsg_strings.po, which are located in /openwin/lib/locale/C/LC_MESSAGES.

See the setlocale(3C)man page for further information on accessing the translated message file.