Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BundleService.getBundleService() throws early #193

Open
pyricau opened this issue Jun 21, 2016 · 0 comments
Open

BundleService.getBundleService() throws early #193

pyricau opened this issue Jun 21, 2016 · 0 comments

Comments

@pyricau
Copy link
Member

pyricau commented Jun 21, 2016

The code does this:

  public static BundleService getBundleService(Context context) {
    BundleServiceRunner runner = BundleServiceRunner.getBundleServiceRunner(context);
    if (runner == null) {
      throw new IllegalStateException(
          "You forgot to set up a " + BundleServiceRunner.class.getName() + " in your activity");
    }
    return runner.requireBundleService(MortarScope.getScope(context));
  }

runner can never be null. BundleServiceRunner.getBundleServiceRunner will throw is there is no BundleServiceRunner in the scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant