Giter VIP home page Giter VIP logo

Comments (10)

machty avatar machty commented on May 19, 2024

Ah I see what the problem is... right now e-c only considers errors "caught" if you call .then / .catch on the task instance, but catching in the catch block of a parent task presently isn't being handled.

Should have a fix for this soon.

from ember-concurrency.

wecc avatar wecc commented on May 19, 2024

At first I didn't think our scenario was the same as this one but then (well, just now) I realized that the double-thrown-error thing only occurred when we saved stuff in modals, and yeah, we pass a task to our modals and our modals has their own task that performs the provided task. So our issue is indeed exactly the same parent/sub-task thing described above.

from ember-concurrency.

wecc avatar wecc commented on May 19, 2024

...well, except we don't catch anything in the parent task so our error is thrown twice.

from ember-concurrency.

wecc avatar wecc commented on May 19, 2024

Sorry for rubber ducking here but I've successfully created a reproduction at https://canary.ember-twiddle.com/3f06ac7ae7accc397a171b494b9b0f64?openFiles=application.controller.js

(for some reason I can't click but have to tab to the perform button)

from ember-concurrency.

machty avatar machty commented on May 19, 2024

Fixed and release in 0.6.2

from ember-concurrency.

dfreeman avatar dfreeman commented on May 19, 2024

It looks like this is solved for direct descendants, but if the handler is more than one task "layer" away, I'm still seeing window.onerror get triggered in this twiddle with 0.6.2.

from ember-concurrency.

machty avatar machty commented on May 19, 2024

@dfreeman yeah, I see it too, and @wecc reported in the Slack channel that if you don't catch an error, you get double error reports. I have an idea for how to fix, will tackle shortly.

from ember-concurrency.

machty avatar machty commented on May 19, 2024

@wecc @dfreeman could you please try out the double-error-fix branch to see if this problem's finally fixed?

from ember-concurrency.

dfreeman avatar dfreeman commented on May 19, 2024

@machty That looks like it did the trick! (...and uncovered a small bug in our global error handler, too)

from ember-concurrency.

wecc avatar wecc commented on May 19, 2024

Sorry for the late response – confirming that 0.6.3 solves the issue in our app! ❤️

from ember-concurrency.

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.