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

Errorback not invoked when module fails to load #81

Closed
dizzib opened this issue Apr 23, 2012 · 3 comments
Closed

Errorback not invoked when module fails to load #81

dizzib opened this issue Apr 23, 2012 · 3 comments

Comments

@dizzib
Copy link

dizzib commented Apr 23, 2012

It seems a module load failure, for example due to network error, does not invoke an errorback.

Reproducable in hello-wire.js by amending index.html line 52...

function ok() { }
function fail(ex) { alert('FAIL:' + ex); }
require(['wire!hello-wired-spec']).then(ok, fail);

Then amend js/hello-wired.js line 7 to this...

define(['foo'], function() {

I'd have thought failing to load non-existant 'foo' should cause fail(ex) to invoke ?

@unscriptable
Copy link
Member

The issue here is that the AMD standard unfortunately doesn't allow a plugin to propagate an error to modules that depend on it (or to the global loader API, e.g. curl()). We have support for this in curl.js, but it's not being utilized (yet) in wire.js.

@unscriptable
Copy link
Member

I assume you're using wire.js, and if so, you should open a ticket there. Let me do that for you: cujojs/wire#32

@dizzib
Copy link
Author

dizzib commented Apr 23, 2012

Ok thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants