Comments (10)
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.
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.
...well, except we don't catch anything in the parent task so our error is thrown twice.
from ember-concurrency.
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.
Fixed and release in 0.6.2
from ember-concurrency.
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.
@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.
@wecc @dfreeman could you please try out the double-error-fix
branch to see if this problem's finally fixed?
from ember-concurrency.
@machty That looks like it did the trick! (...and uncovered a small bug in our global error handler, too)
from ember-concurrency.
Sorry for the late response – confirming that 0.6.3 solves the issue in our app! ❤️
from ember-concurrency.
Related Issues (20)
- Test helpers for enqueued tasks
- Use "real" symbol instead of string for yieldableSymbols HOT 2
- resetState: true does not reset performCount
- Use same types for return and arg HOT 2
- Plans for Ember 4.x migration HOT 1
- Not working in Ember 4.8+ HOT 3
- Ember 4.8 types preview issue HOT 1
- Decorators in JavaScript project HOT 1
- Typescript question for creating custom task modifiers HOT 1
- Docs code examples gone in the latest version
- Docs recommend using a private Ember API for test cleanup HOT 3
- 3.0.0 doesn’t include #512? HOT 2
- Perfrom helper in Typescript HOT 2
- Export types for helpers HOT 1
- Allow ember v5 in `peerDependencies`
- Usage in a V2 addon HOT 13
- Allow setting `cancelAll()` options on `{{cancel-all}}` helper
- Not working with ember-cli-babel 8.x HOT 2
- Babel issue with `ember-concurrency` 4.0.0 HOT 1
- Superfluous triple-slash directives generated by Glint produce Glint errors (manually removing them fixes this) HOT 5
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 ember-concurrency.