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

CanJS Swallowing Errors #454

Closed
thecountofzero opened this issue Jul 26, 2013 · 1 comment
Closed

CanJS Swallowing Errors #454

thecountofzero opened this issue Jul 26, 2013 · 1 comment
Milestone

Comments

@thecountofzero
Copy link
Contributor

Under certain circumstances CanJS swallows JavaScript errors and keeps them from being displayed in the console. I have yet to confirm a complete pattern, but one example seems to be when the error is within the .then of a findAll()

This issue is demonstrated in the following fiddle:

http://jsfiddle.net/thecountofzero/BuvnA/

@daffl asked me to reference issue #384

@thecountofzero
Copy link
Contributor Author

If you put a breakpoint on the console.dirs line and then step into, it brings you to

var pipe = function(def, model, func) {
    var d = new can.Deferred();
    def.then(function() {
        var args = can.makeArray(arguments);
        try {
            args[0] = model[func](args[0]);
            d.resolveWith(d, args);
        } catch (e) {
            d.rejectWith(d, [e].concat(args));    // THIS LINE
        }
    }, function() {
        d.rejectWith(this, arguments);
    });

It appears the error is being caught in the try/catch

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

1 participant