feedback on error #117

jpcaruana opened this Issue Aug 2, 2012 · 3 comments


None yet

3 participants


when curl fails to load files (eg. circular dependency), there is no feedback to help, not even an error.
It would be great to have some kind of feedback : a console log, an error or even a (horrible) alert window.

The Javascript Architectural Toolkit member

Hey @jpcaruana!

Are you using AMD-wrapped commonjs modules? Just wondering because they allow curl.js to detect and circumvent circular dependencies. It's problematic (and cpu-intensive) to detect cycles in "normal" AMD modules.

Fwiw, I never advocate coding cycles on purpose. There's never a good use case for them. :)

On the other hand, there's always the possibility of a circular dependency happening by accident. curl.js doesn't offer any feedback when this happens. I guess this is what you encountered?

I guess I should add some documentation that explains that silence means a circular dependency. (Some plugins can cause silent failures, too, actually.) 404s, mismatched module ids, and syntax errors are noisy -- as you'd expect.

Thanks for alerting me to this. I'll fix the docs.


-- John

@unscriptable unscriptable was assigned Aug 2, 2012

Ok. Thanks for your answer. I'll try to avoid circular dependency next time :)
-- JP


I'm getting no feedback on a 404.

I combined curl with the plugins: css, j, text

        "js!scripts/library123.js"  // renamed to cause a 404
    function(){ console.log(arguments); },
    function(){ console.log("ERROR"); } // never called

Here is the browser (Safari) error in the console:
Failed to load resource file://localhost/Users/user/Desktop/Test/scripts/library123.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment