提交 4a7c708b 编写于 作者: J JessYan

Improve errorMessage

上级 48fe6569
......@@ -84,7 +84,7 @@ public class BaseApplication extends Application implements App {
@Override
public AppComponent getAppComponent() {
Preconditions.checkNotNull(mAppDelegate, "%s cannot be null", AppDelegate.class.getName());
Preconditions.checkState(mAppDelegate instanceof App, "%s must be implements %s", AppDelegate.class.getName(), App.class.getName());
Preconditions.checkState(mAppDelegate instanceof App, "%s must be implements %s", mAppDelegate.getClass().getName(), App.class.getName());
return ((App) mAppDelegate).getAppComponent();
}
......
......@@ -200,8 +200,9 @@ public class AppDelegate implements App, AppLifecycles {
@Override
public AppComponent getAppComponent() {
Preconditions.checkNotNull(mAppComponent,
"%s cannot be null,first call %s#onCreate(Application) in %s#onCreate()",
AppComponent.class.getName(), getClass().getName(), Application.class.getName());
"%s cannot be null, first call %s#onCreate(Application) in %s#onCreate()",
AppComponent.class.getName(), getClass().getName(), mApplication == null
? Application.class.getName() : mApplication.getClass().getName());
return mAppComponent;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册