KCMS Application Developer's Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Warning and Error Messages

6

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
Enumerated Warning ConstantDescription
KCS_WARNINGS_STARTThe beginning of the defined warnings.
KCS_ATTR_LARGE_CT_SUPPLIEDAttribute count supplied field was unexpectedly large.
KCS_CANNOT_DEOPTIMIZEOriginal data not available so optimization cannot be changed.
KCS_CANNOT_OPTIMIZEThis profile cannot be optimized.
KCS_OPERATION_CANCELLEDThis operation was cancelled by the application's user.
KCS_SPEC_CMM_NOT_FOUNDSpecified CMM was not found.
KCS_TRUNCATEDThe buffer you supplied was too small.
Therefore, the data in it was truncated.
KCS_WARNINGS_ENDMarks 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
Enumerated Error ConstantDescription
General Failures:
KCS_ERRORS_STARTBeginning of errors.
KCS_NOT_AVAILABLEKCMS has not been installed or is not available.
Table 6-2 (Continued)
Enumerated Error ConstantDescription
Memory:
KCS_MEM_ALLOC_ERR
OS:
Memory allocation error.
KCS_OS_ERR
IO:
General OS error.
KCS_IO_READ_ERRRead error.
KCS_IO_WRITE_ERRWrite error.
KCS_IO_SEEK_ERRSeek error.
KCS_IO_UNKNOWN_TYPE_ERR

Solaris File:
An unknown KcsProfileDesc
type entry was found.
KCS_SOLARIS_FILE_NOT_OPENEDCannot open profile.
KCS_SOLARIS_FILE_ROCannot open profile for writing.
KCS_SOLARIS_FILE_LOCKEDProfile is locked by another process.
KCS_SOLARIS_FILE_NAME_NULL
X11 Profile:
Filename pointer is NULL.
KCS_X11_DATA_NULLDisplay or visual pointer is NULL.
KCS_X11_PROFILE_NOT_LOADEDCannot load profile; may be locked or does not exist.
KCS_X11_PROFILE_RO
Profile:
Remote X11 profiles are read only.
KCS_PROF_ID_BADInvalid profile ID.
KCS_PROF_FORMAT_BADProfile format error.
KCS_PROF_CT_EXCEEDS_PROF_LISTNumber of profiles on list is smaller than argument count.
KCS_PROF_INCOMPLETE
KCS_PROF_NO_DATA_SUPPORT_4_REQUEST
KCS_PROF_REQ_ATTRS_INCOMPLETE
Incomplete profile specified.
Table 6-2 (Continued)
Enumerated Error ConstantDescription
Attributes:
KCS_ATTR_NAME_OUT_OF_RANGESpecified attribute is out of range.
KCS_ATTR_TYPE_UNKNOWNAttribute type supplied by user is not known.
KCS_ATTR_LOAD_FORMAT_INCORRECTThe format of the attribute does not match specifications upon loading.
KCS_ATTR_LOAD_FLOAT_ERRError interpreting a float upon loading.
KCS_ATTR_LOAD_INT_ERRError interpreting an integer upon loading.
KCS_ATTR_DATE_TIME_FORMATThe format of the date time stamp does not match specifications.
KCS_ATTR_CT_ZERO_OR_NEGThe count supplied in KcsAttributeValue was zero or negative.
KCS_ATTR_READ_ONLY

Connection:
Attempting to set an attribute that is
read only.
KCS_CONNECT_FAILEDPair of profiles could not be connected.
KCS_CONNECT_PRECISION_UNACCEPTABLEProfile connect will result in unacceptable precision.
KCS_CONNECT_OPT_FORCED_DATA_LOSSThe last optimization forced the KCMS framework to remove some data necessary for this operation.
KCS_CONNECT_PROFILES_CT_ERRThe operation requires a different number of profiles in the list than supplied.
KCS_CONNECT_QUANT_MISMATCHMismatch between the quantization of a pair of profiles.
KCS_CONNECT_UNIMP_OPConnect operation is
unimplemented.
Table 6-2 (Continued)
Enumerated Error ConstantDescription
Validation:
KCS_MISMATCHED_WHITEPOINTSProfile white points did not match during validation.
KCS_MISMATCHED_BLACKPOINTSProfile black points did not match during validation.
KCS_MISMATCHED_COLORSPACESProfile color spaces did not match during validation.
KCS_MISMATCHED_DIMENSIONSProfile dimensions did not match during validation.
KCS_MISMATCHED_VERSIONS

Layout:
Profile versions did not match
during validation.
KCS_LAYOUT_INVALIDInvalid pixel layout.
KCS_LAYOUT_UNSUPPORTEDUnsupported pixel layout.
KCS_LAYOUT_MISMATCH

Evaluation:
Pixel layouts do not match profile
input and output specifications.
KCS_EVAL_TOO_MANY_CHANNELSMore channels specified in the pixel layout structure than the profile supports.
KCS_EVAL_BUFFER_OVERFLOWCaller's buffer too small.
KCS_EVAL_ONLY_ONE_OP_ALLOWED

Characterization/Calibration:
KcsEvaluate only supports one
operation at a time, (KcsForward).
KCS_CC_UPDATE_NEEDS_MORE_DATAData supplied is inadequate.
KCS_CC_UPDATE_INVALID_DATAData supplied is invalid.
KCS_CC_INCORRECT_COLOR_SPACECharacterization/calibration data contains incorrect color space.
Table 6-2 (Continued)
Enumerated Error ConstantDescription
KCS_CC_NUM_COMPS_OUT_OF_RANGECharacterization/calibration data contains incorrect number of I/O components.
KCS_CC_TOO_FEW_MEASUREMENTSNot enough measurements to support calibrating or characterizing this device.
KCS_CC_TABLE_DATA_BADTable data is out of range.
KCS_CC_INCORRECT_DEV_TYPEKcsAttributeDevType is incorrect.
KCS_CC_INCORRECT_ATTR_CLASSKcsAttributeClass is incorrect.
KCS_CC_CANNOT_CAL_DEV_TYPEDevice type cannot be calibrated.
KCS_CC_CANNOT_CHAR_DEV_TYPEDevice type cannot be characterized.
KCS_CC_INPUT_NOT_RAMP
Color Management Module:
Currently data must be a ramp.
KCS_CMM_RTLOAD_FAILEDRuntime loading of CMM failed.
KCS_CMM_MAJOR_VERSION_MISMATCHIncompatible CMM major version number.
KCS_CMM_MINOR_VERSION_MISMATCHIncompatible CMM minor version number.
KCS_CMM_UNKNOWN_TECHNOLOGYCMM requested could not be found.
KCS_CMM_UNKNOWN_RUNTIME_TYPECMM associated with this profile could not be found.
KCS_CMM_UNSUPPORTED_OP

Unimplemented Features:
Operation not supported by this
CMM.
KCS_UNIMP_NESTED_CONNECTIONSCurrently, KCMS cannot handle nested connections.
KCS_UNIMP_TOO_MANY_PROFILESProfile array contains too many profiles.
KCS_UNIMP_ILLEGAL_TECHNOLOGYWhen connecting profiles, one CMM technology is incompatible with another CMM technology. (Very rare with standard ICC profile format.)
Table 6-2 (Continued)
Enumerated Error ConstantDescription
Internal:
KCS_INTERNAL_CLASS_CORRUPTEDInternal error related to one of the KCMS classes.
KCS_INTERNAL_DATA_CORRUPTED

IO:

Internal error related to one of the KCMS data.
KCS_HOSTNAME_ERRORHost 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 page 76). 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.