Giter VIP home page Giter VIP logo

Comments (4)

sergejsha avatar sergejsha commented on June 23, 2024

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.

NicolaVerbeeck avatar NicolaVerbeeck commented on June 23, 2024

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.

sergejsha avatar sergejsha commented on June 23, 2024

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.

sergejsha avatar sergejsha commented on June 23, 2024

Changes have been pushed to the master branch

from tinybus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.