Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.plugin.common.ErrorLogResult Class Reference
Inheritance diagram for io.flutter.plugin.common.ErrorLogResult:
io.flutter.plugin.common.MethodChannel.Result

Public Member Functions

 ErrorLogResult (String tag)
 
 ErrorLogResult (String tag, int level)
 
void success (@Nullable Object result)
 
void error (String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails)
 
void notImplemented ()
 
- Public Member Functions inherited from io.flutter.plugin.common.MethodChannel.Result
void success (@Nullable Object result)
 
void error ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails)
 
void notImplemented ()
 

Detailed Description

An implementation of MethodChannel.Result that writes error results to the Android log.

Definition at line 14 of file ErrorLogResult.java.

Constructor & Destructor Documentation

◆ ErrorLogResult() [1/2]

io.flutter.plugin.common.ErrorLogResult.ErrorLogResult ( String  tag)
inline

Definition at line 18 of file ErrorLogResult.java.

18 {
19 this(tag, Log.WARN);
20 }
void Log(const char *format,...) SK_PRINTF_LIKE(1
Definition: TestRunner.cpp:137

◆ ErrorLogResult() [2/2]

io.flutter.plugin.common.ErrorLogResult.ErrorLogResult ( String  tag,
int  level 
)
inline

Definition at line 22 of file ErrorLogResult.java.

22 {
23 this.tag = tag;
24 this.level = level;
25 }

Member Function Documentation

◆ error()

void io.flutter.plugin.common.ErrorLogResult.error ( String  errorCode,
@Nullable String  errorMessage,
@Nullable Object  errorDetails 
)
inline

Definition at line 31 of file ErrorLogResult.java.

32 {
33 String details = (errorDetails != null) ? " details: " + errorDetails : "";
34 if (level >= Log.WARN || BuildConfig.DEBUG) {
35 Log.println(level, tag, errorMessage + details);
36 }
37 }

◆ notImplemented()

void io.flutter.plugin.common.ErrorLogResult.notImplemented ( )
inline

Handles a call to an unimplemented method.

Implements io.flutter.plugin.common.MethodChannel.Result.

Definition at line 40 of file ErrorLogResult.java.

40 {
41 if (level >= Log.WARN || BuildConfig.DEBUG) {
42 Log.println(level, tag, "method not implemented");
43 }
44 }

◆ success()

void io.flutter.plugin.common.ErrorLogResult.success ( @Nullable Object  result)
inline

Handles a successful result.

Parameters
resultThe 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.

Implements io.flutter.plugin.common.MethodChannel.Result.

Definition at line 28 of file ErrorLogResult.java.

28{}

The documentation for this class was generated from the following file: