public class ErrorLogResult extends Object implements MethodChannel.Result
MethodChannel.Result
that writes error results to the Android log.Constructor and Description |
---|
ErrorLogResult(String tag) |
ErrorLogResult(String tag,
int level) |
Modifier and Type | Method and Description |
---|---|
void |
error(String errorCode,
String errorMessage,
Object errorDetails)
Handles an error result.
|
void |
notImplemented()
Handles a call to an unimplemented method.
|
void |
success(Object result)
Handles a successful result.
|
public ErrorLogResult(String tag)
public ErrorLogResult(String tag, int level)
public void success(@Nullable Object result)
MethodChannel.Result
success
in interface MethodChannel.Result
result
- The result, possibly null. The result must be an Object type supported by the
codec. For instance, if you are using StandardMessageCodec
(default), please see
its documentation on what types are supported.public void error(String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails)
MethodChannel.Result
error
in interface MethodChannel.Result
errorCode
- An error code String.errorMessage
- A human-readable error message String, possibly null.errorDetails
- Error details, possibly null. The details must be an Object type
supported by the codec. For instance, if you are using StandardMessageCodec
(default), please see its documentation on what types are supported.public void notImplemented()
MethodChannel.Result
notImplemented
in interface MethodChannel.Result