Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to bubble up image load errors #5448

Closed
lyzs90 opened this issue Dec 27, 2018 · 3 comments
Closed

Option to bubble up image load errors #5448

lyzs90 opened this issue Dec 27, 2018 · 3 comments
Labels
stale Issue marked as stale by the stale bot

Comments

@lyzs90
Copy link

lyzs90 commented Dec 27, 2018

Is your feature request related to a problem? Please describe.
I'm trying to render canvases in bulk on Node.js using loadFromJSON with public urls as my object sources. Thereafter I flatten them as pngs. I noticed that on flakey connections, images will fail to load silently (well not exactly, Fabric does log 'Error loading ...' to the console). This is an issue for me because I would prefer Fabric to not render the entire canvas at all than render a canvas with missing objects/background.

Describe the solution you'd like
I am able to specify that errors should be bubbled up, either during canvas instantiation or loading.

Describe alternatives you've considered
I considered using the reviver for bubbling errors, but that would mean I'll have to roll my own promisification of the loadFromJSON method (i'm using bluebird promisify right now). I'll probably do that if it doesn't make sense to support this request.

@asturur
Copy link
Member

asturur commented Dec 28, 2018

well we could bubble up errors, this is a normal request and a normal feature for libraries.

I think the only way to do that right now is to add a error argument or an additional error callback.

@asturur
Copy link
Member

asturur commented Apr 22, 2020

i know 2 years are passed, and you probably also forgot whatever where we talking here.
But could this PR be a fix for this issue?
#6238

@stale
Copy link

stale bot commented May 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label May 6, 2020
@stale stale bot closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue marked as stale by the stale bot
Projects
None yet
Development

No branches or pull requests

2 participants