## XDS Errors

Errors are reported to the application program by means of DS_status, which is a result of every function (it is the function result in the C language binding for most functions). A function that completes successfully returns the value DS_SUCCESS, whereas one that is not successful returns an error. The error is a private object containing details of the problem that occurred. The error constant DS_NO_WORKSPACE can be returned by all directory service functions, except ds_initialize( ). DS_NO_WORKSPACE is returned if ds_initialize( ) is not invoked before calling any other directory service function.

Errors are classified into ten OM classes. The standards (see The Directory: Abstract Service Definition , ISO 9594-3, CCITT X.511) classify errors into eight different groups, as follows:

· Abandoned

· Abandon Failed

· Attribute Error

· Name Error

· Referral

· Security Error

· Service Error

· Update Error

The directory service interface never returns an Abandoned error. The interface also defines three more kinds of errors, as follows:

· DS_C_LIBRARY_ERROR

· DS_C_COMMUNICATIONS_ERROR

· DS_C_SYSTEM_ERROR

Each of these kinds of errors is represented by an OM class. These OM classes are detailed in subsequent topics. All of them inherit the OM attribute DS_PROBLEM from their superclass DS_C_ERROR, which is described in this topic. The values DS_PROBLEM can take are listed in the relevant subsections of this topic. For a description of these errors please refer to the OSF DCE Problem Determination Guide. The error OM classes defined in this topic are part of the directory service package.

The ds_bind( ) operation returns a Security Error or a Service Error. All other operations can also return the same errors as ds_bind( ). Such errors can arise in the course of following an automatic referral list.

DS_C_REFERRAL is not a real error, and it is not a subclass of DS_C_ERROR, although it is reported in the same way as a DS_status result. A DS_C_ATTRIBUTE_ERROR, also not a subclass of DS_C_ERROR, is special because it can report several problems at once. Each one is reported in DS_C_ATTRIBUTE_PROBLEM, which is a subclass of DS_C_ERROR.

##