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

Comments

Projects
None yet
1 participant
@thecountofzero
Contributor

thecountofzero commented Jul 26, 2013

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

This comment has been minimized.

Show comment
Hide comment
@thecountofzero

thecountofzero Jul 26, 2013

Contributor

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

Contributor

thecountofzero commented Jul 26, 2013

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