Many space operations return a result object—or in C, a
status value— or, in the case of batch operations, a list of result objects. The operations that return a Result always return a result even if the operation failed (likewise, a status is always returned in C). Result objects always contain a status code (which is the same as the status codes returned directly by the functions in C).
Each status code has one of three types: no error,
error, or
severe error.
No error indicates that the operation was successful, and data was returned.
Errors indicate that the operation was successful from a system standpoint, but no data could be returned (because there was no tuple in the space or because the tuple in the space was locked).
Severe errors indicate that the operation failed because of a system problem. If the status indicates an error or severe error, it is possible to get an exception (or an error object in C) using the
getError() or
getSevereError() methods of the Result (or in C, using
tibasError_GetError() or
tibasError_GetSevereError()).
Result (and
ResultList) also has convenience
hasError() and
hasSevereError() methods that return
true if the
Result object (or any of the
Results contained in the list) has an
Error or
SevereError.
If the operation was successful and resulted in an tuple being returned, this tuple can be retrieved from the Result object using the
getEntry method, in this case it is also possible to directly retrieve the tuple contained in that tuple using the
Result object's
getTuple method.