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

LifecycleEndException handling #52

Closed
ZacSweers opened this issue Mar 15, 2017 · 6 comments
Closed

LifecycleEndException handling #52

ZacSweers opened this issue Mar 15, 2017 · 6 comments
Milestone

Comments

@ZacSweers
Copy link
Collaborator

Specifically, some might want to just dispose quietly (in production, or always) rather than error. Should we make this more configurable? If so, how/to what degree? Moving this discussion here from an internal one.

Currently - LifecycleEndException is propagated to the delegate observer's onError. I see two options:

A. If the delegate doesn't implement onError, it goes to RxJavaPlugins and one could filter that in a plugin hook. This would not cover cases where onError is implemented though. Is this fine?
B. We make this more explicitly configurable

  • Scoper overloads?
  • RxJavaPlugins-esque plugin system?
  • Nothing, advise just writing a custom ScopeProvider implementation using ScopeUtils?

CC @tonycosentini @AttwellBrian

@tonycosentini
Copy link
Contributor

What about just advising people to potentially non-fatal them in their own onError plugin implementation?

@AttwellBrian
Copy link

A. If the delegate doesn't implement onError, it goes to RxJavaPlugins and one could filter that in a plugin hook. This would not cover cases where onError is implemented though. Is this fine?

I can't think of a reason this wouldn't be fine. It was good enough for us? Do other companies implement onError() more than us?

@tonycosentini
Copy link
Contributor

After syncing with @hzsweers in person, one idea is a plugin system for AutoDispose itself. The default implementation would just route to onError like it does currently, but would allow for custom handlers (for logging/non-fatals or whatever else makes sense for a specific app).

@ZacSweers
Copy link
Collaborator Author

Cool, plugin system sounds good. @tonycosentini do you want to start a PR around that? Structure would probably be best in the same vein as RxJavaPlugins

@tonycosentini
Copy link
Contributor

Yup, will give it a shot.

@ZacSweers
Copy link
Collaborator Author

Done in #57

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

No branches or pull requests

3 participants