Comments (4)
This was intentional design decision. Bus fails fast to reveal all errors immediately during development. If exception happens, then it must be fixed. Application will typically force close afterwards.
Why would you need to resume and continue? What is your exact use case?
from tinybus.
I agree that this helps fix application errors by forcing this during development, but when an error like this would occur in a production app, in theory, the app could continue working (if the exception was caught, in which case the app design should have been better, agreed).
I think this is a balance between forcing better flow design and robustness in case of failure. Now that we know runtime errors can be thrown when registering for example, we can check for this (and remove the catch-all from otto shame)
from tinybus.
I believe your request is good. I just wanted to better understand all consequences.
Current implementation starts to simply ignore requests coming after an exception. This is rather hiding issue, then making it obvious, which is bad. A better solution would be either to continue to handle events properly, or to fail on every follow-up request showing that bus state is invalid. As far as Bus does not hide any exceptions and if subscribers caught them, the bus must recover and continue with prop event dispatching. It won't make things better, and would be robust.
from tinybus.
Changes have been pushed to the master branch
from tinybus.
Related Issues (20)
- Remove delayed events when bus gets destroyed
- add travis build
- Android minSdkVersion HOT 1
- @Subscribe visibility? HOT 5
- Generate warnings for not public handler methods HOT 6
- can tinybus support process crossing? HOT 2
- subclasses do not receive events? HOT 1
- Is TinyBus library minSdkVersion 14? HOT 1
- TinyBus can't deliver large objects? HOT 4
- Any reason for such high minimum sdk?
- Not enough information in error message
- Exception on activity start
- java.lang.NoClassDefFoundError: android/os/PersistableBundle crash HOT 4
- Calling unregister() on an unregistered object throws NPE
- Can support for activity post to another activity like eventbus? HOT 2
- Tinybus Android Studio Plugin HOT 1
- Only last event gets delivered when posting multiple events via .postDelayed() HOT 3
- Build system is broken, Pull requests cannot be merge due to that
- java.lang.RuntimeException HOT 6
- Tinybus Intellij Plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinybus.