Class ExecutionStatuses
java.lang.Object
com.exonum.binding.common.blockchain.ExecutionStatuses
public final class ExecutionStatuses extends Object
Provides factory methods for creating some execution statuses, which represent a result
of the runtime operation execution (most often — service transaction execution).
Only the factory methods for the most common statuses are provided; consider using the Runtime.ExecutionStatus.newBuilder() for other error kinds.
- See Also:
Runtime.ExecutionStatus
-
Method Summary
Modifier and Type Method Description static Runtime.ExecutionStatus
serviceError(int code)
Creates an execution status corresponding to a service-defined error with an empty description.static Runtime.ExecutionStatus
serviceError(int code, String description)
Creates an execution status corresponding to a service-defined error.static Runtime.ExecutionStatus
success()
Creates a successful execution status.
-
Method Details
-
success
Creates a successful execution status. -
serviceError
Creates an execution status corresponding to a service-defined error with an empty description. The status will have the kind field equal toRuntime.ErrorKind.SERVICE
.- Parameters:
code
- a service-defined error code; must be non-negative
-
serviceError
Creates an execution status corresponding to a service-defined error. The status will have the kind field equal toRuntime.ErrorKind.SERVICE
.- Parameters:
code
- a service-defined error code; must be non-negativedescription
- an error description; may be empty
-