Skip to content

Instantly share code, notes, and snippets.

@briancavalier briancavalier/1-1-test.js
Last active Aug 29, 2015

Embed
What would you like to do?
Seriously detailed stacks in when.js 3.1
require('../../monitor/console');
var Promise = require('../../when').Promise;
function error(){
throw new Error('error');
}
Promise.resolve('foo').then(function(){
return Promise.resolve(123);
}).then(function(){
return new Promise(function(resolve){
setTimeout(function(){
resolve('abc');
}, 500);
});
}).then(function(){
return Promise.resolve('bar').then(function(){
return 456;
});
}).then(error);
Error: error
at error (/Users/brian/Projects/cujojs/when/experiments/trace-test/done.js:5:8)
from execution context:
at Object.<anonymous> (/Users/brian/Projects/cujojs/when/experiments/trace-test/done.js:20:4)
from execution context:
at Object.<anonymous> (/Users/brian/Projects/cujojs/when/experiments/trace-test/done.js:16:4)
from execution context:
at Object.<anonymous> (/Users/brian/Projects/cujojs/when/experiments/trace-test/done.js:10:4)
from execution context:
at Object.<anonymous> (/Users/brian/Projects/cujojs/when/experiments/trace-test/done.js:8:24)
require('../monitor/console');
var Promise = require('../when').Promise;
Promise.resolve().then(function f1() {
Promise.resolve().then(function f2() {
Promise.resolve().then(function f3() {
doh();
});
});
});
ReferenceError: doh is not defined
at f3 (/Users/brian/Projects/cujojs/when/experiments/trace.js:7:4)
from execution context:
at f2 (/Users/brian/Projects/cujojs/when/experiments/trace.js:6:21)
from execution context:
at f1 (/Users/brian/Projects/cujojs/when/experiments/trace.js:5:10)
from execution context:
at Object.<anonymous> (/Users/brian/Projects/cujojs/when/experiments/trace.js:4:9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.