Skip to content

Instantly share code, notes, and snippets.

View jdmarshall's full-sized avatar
💭
Exploring Elixir

Jason Marshall jdmarshall

💭
Exploring Elixir
View GitHub Profile
#! /usr/bin/env node
var domain = require('domain');
var Promise = require('bluebird');
console.log('This is a demonstration of a bug in Bluebird when Domains are involved.');
console.log('If a then() throws an exception, the domain does not exit() and remains on the stack.');
function reportDomainDepth(state) {
console.log(state + ', current domain depth is ' + domain._stack.length);