Giter Club home page Giter Club logo

Comments (5)

tildedave avatar tildedave commented on August 22, 2024

Handling this better would be very nice - I have to try/catch while debugging because exceptions (from my code) get swallowed by the Dispatchr error handling mechanism. Guidance on best practices would be appreciated!

from dispatchr.

mridgway avatar mridgway commented on August 22, 2024

Ok, so most of this stems from the fact that we're not resetting currentAction after a thrown exception. Perhaps we can add a try/catch/finally to the execute method to ensure that it gets reset.

from dispatchr.

mbfisher avatar mbfisher commented on August 22, 2024

@mridgway this is hopefully what's achieved in #47.

M

from dispatchr.

mridgway avatar mridgway commented on August 22, 2024

I'm not sure that we need to differentiate the internal errors with the store's errors in this case. Both should still throw, but they should be able to be handled by the caller to dispatch. Also, I think in your implementation the this.currentAction wouldn't get reset since throw would exit the flow.

Here is my proposal for fixing this: 66f5355

from dispatchr.

mbfisher avatar mbfisher commented on August 22, 2024

Yup, you're right! That looks spot on.

M
On 12 Jan 2015 20:56, "Michael Ridgway" [email protected] wrote:

I'm not sure that we need to differentiate the internal errors with the
store's errors in this case. Both should still throw, but they should be
able to be handled by the caller to dispatch. Also, I think in your
implementation the this.currentAction wouldn't get reset since throw
would exit the flow.

Here is my proposal for fixing this: 66f5355
66f5355


Reply to this email directly or view it on GitHub
#46 (comment).

from dispatchr.

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.