Skip to content

Commit 64ece8a

Browse files
committed
优化inject()方法
1 parent 459fad7 commit 64ece8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GoRouter-Api/src/main/java/com/wyjson/router/core/RouteCenter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ public static <T> void inject(T target, Intent intent, Bundle bundle, boolean is
167167
try {
168168
bundle = getBundle(target, intent, bundle);
169169
} catch (Exception e) {
170-
throw new RuntimeException("inject() " + e.getMessage());
170+
GoRouter.logger.warning(null, "inject() " + e.getMessage());
171+
return;
171172
}
172173

173174
String path = getCurrentPath(bundle);
174175
if (TextUtils.isEmpty(path)) {
175-
GoRouter.logger.error(null, "[inject] The " + ROUTER_CURRENT_PATH + " parameter was not found in the intent");
176+
GoRouter.logger.warning(null, "[inject] The " + ROUTER_CURRENT_PATH + " parameter was not found in the intent");
176177
return;
177178
}
178179

0 commit comments

Comments
 (0)