public class ZendriveOperationResult
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ZendriveOperationResult |
createError(ZendriveErrorCode errorCode,
java.lang.String errorMessage)
Create a result object for a failed operation.
|
static ZendriveOperationResult |
createSuccess()
Create a result object for a successful operation.
|
ZendriveErrorCode |
getErrorCode()
Get the error code for the operation if the operation failed.
|
java.lang.String |
getErrorMessage()
Get the error message for the operation if this is the result of a failed operation.
|
boolean |
isSuccess()
Is the operation successful?
|
public boolean isSuccess()
public ZendriveErrorCode getErrorCode()
public java.lang.String getErrorMessage()
getErrorCode()
to surface appropriate
messages to users of your app if necessary.public static ZendriveOperationResult createError(ZendriveErrorCode errorCode, java.lang.String errorMessage)
errorCode
- The error code for the failure.errorMessage
- Detailed message for the failure.public static ZendriveOperationResult createSuccess()