OSF DCE Application Development Guide--Core Components

Attribute Configuration Language
18.3.7 The comm_status and fault_status Attributes
The comm_status and fault_status attributes cause the status code of any
communications failure or server runtime failure that occurs in a remote procedure call
to be stored in a parameter or returned as an operation result, instead of being raised to
the client application code as an exception.
The comm_status attribute causes communications failures to be reported through a
specified parameter. The fault_status attribute causes server failures to be reported
through a specified parameter. Applying both attributes causes all remote and
communications failures to be reported through status. Any local exception caused by
an error during marshalling, correctness checking performed by the client stubs, or an
error in application routines continues to be returned as an exception.
The comm_status and fault_status attributes have the following syntax. (See the
examples at the end of this section.)
For an operation—
[comm_status | fault_status] operation_name ([parameter_list]);
For a parameter—
operation_name ([comm_status | fault_status] parameter_name);
Note: You can apply one of each attribute to the same operation and/or parameter
at the same time. Separate the attributes with a comma. (See the example
at the end of this section.)
If the parameter named in a comm_status or fault_status attribute is in the
parameter list for the operation in the IDL file, then it must have the out
attribute in the IDL file. (Additional ACF parameters do not have in and
out directional attributes.)
If the status attribute occurs on the operation, the returned value result must be defined
as type error_status_t in the IDL file. If an error occurs during execution of the
operation, the error code is returned as the operation result. If the operation completes
successfully, the value returned to the client is the value returned by the manager code.
Note: The error_status_t type is equivalent to unsigned32, which is the data
type used by the RPC runtime for an error status. The status code
error_status_ok is equivalent to rpc_s_ok, which is the RPC runtime
success status code.
If the status attribute occurs on a parameter, the parameter name does not have to be
defined in the IDL file, although it can be. Note the following:
If the parameter name is one used in the IDL file, then that parameter must be an
output parameter of type error_status_t. If the operation completes successfully,
the value of this parameter is the value returned by the manager code.
124245 Tandem Computers Incorporated 189