Skip to content

Commit 8311247

Browse files
committed
result.error回调object转为String
1 parent 19b1c10 commit 8311247

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

android/src/main/java/com/idlefish/flutterboost/FlutterBoostPlugin.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.idlefish.flutterboost;
22

33
import android.os.Handler;
4+
import android.util.Log;
5+
46
import androidx.annotation.Nullable;
57

68
import com.idlefish.flutterboost.interfaces.IContainerRecord;
@@ -212,7 +214,7 @@ record = mManager.getLastGenerateRecord();
212214

213215

214216
} catch (Throwable t) {
215-
result.error("no flutter page found!", t.getMessage(), t);
217+
result.error("no flutter page found!", t.getMessage(), Log.getStackTraceString(t));
216218
}
217219
}
218220
break;
@@ -231,7 +233,7 @@ public void onResult(Map<String, Object> rlt) {
231233
}
232234
});
233235
} catch (Throwable t) {
234-
result.error("open page error", t.getMessage(), t);
236+
result.error("open page error", t.getMessage(), Log.getStackTraceString(t));
235237
}
236238
}
237239
break;
@@ -244,7 +246,7 @@ public void onResult(Map<String, Object> rlt) {
244246
mManager.closeContainer(uniqueId, resultData, exts);
245247
result.success(true);
246248
} catch (Throwable t) {
247-
result.error("close page error", t.getMessage(), t);
249+
result.error("close page error", t.getMessage(), Log.getStackTraceString(t));
248250
}
249251
}
250252
break;
@@ -256,7 +258,7 @@ public void onResult(Map<String, Object> rlt) {
256258
mManager.onShownContainerChanged(newId, oldId);
257259
result.success(true);
258260
} catch (Throwable t) {
259-
result.error("onShownContainerChanged", t.getMessage(), t);
261+
result.error("onShownContainerChanged", t.getMessage(), Log.getStackTraceString(t));
260262
}
261263
}
262264
break;

0 commit comments

Comments
 (0)