OpenGroup::arm40::Provisional::transaction::IArmErrorCallback Interface Reference
The use of IArmErrorCallback is optional. More...
Public Member Functions | |
void | errorCodeSet (IArmInterface errorObject, string interfaceName, string methodName) |
Callback method called by the ARM implementation. |
Detailed Description
IArmErrorCallback is different from all the other ARM interfaces because instead of the ARM implementation creating objects that implement the interface, the application creates an object that implements it.
The application can create an ArmErrorCallback and register it with the IArmApplication SetErrorCallback() method.
The use of IArmErrorCallback is optional.
IArmErrorCallback
is different from all the other ARM interfaces because instead of the ARM implementation creating objects that implement the interface, the application creates an object that implements it. The application can create an IArmErrorCallback
and register it with the SetErrorCallback()
method of one of the ARM factory classes. If the registration is accepted, anytime a method results in an error, the ARM implementation:
-
Sets the objects error code. This error code can be retrieved with the
GetErrorCode()
method ofIArmInterface
, from which all other ARM interfaces with methods derive. -
Calls
errorCodeSet()
inIArmErrorCallback
, if an IArmErrorCallback has been successfully registered. - Returns the error code if the method that caused the error returns an error code.
There are no expected or required behaviors for the implementation of errorCodeSet()
.
Examples of things a callback method may do are:
- Nothing.
- Log an error. This would be a common behavior during program debug.
- Reset the error code to zero, or set it to some other value. This is a way for an error handling policy to be implemented centrally, and communicated to the rest of the application code.
Member Function Documentation
void OpenGroup::arm40::Provisional::transaction::IArmErrorCallback::errorCodeSet | ( | IArmInterface | errorObject, | |
string | interfaceName, | |||
string | methodName | |||
) |
All parameters must contain non-null
values.
- Parameters:
-
errorObject a reference to the ARM implementations object that detected the error. The callback method can use the GetErrorCode()
oferrorObject
to get the error code value, which will be negative.interfaceName the name of an interface in one of the ARM specification packages. methodName the name of a method in that interface.
The documentation for this interface was generated from the following file:
- opengroup/arm40/provisional/transaction/IArmErrorCallback.cs