Skip to content

Instantly share code, notes, and snippets.

@isaacs isaacs/fail.js
Created Jan 27, 2012

Embed
What would you like to do?
// node fail.js | head -n3
function write()
{
try {
process.stdout.write('Hello, world\n');
} catch (ex) {
throw new Error('this should not happen');
}
process.nextTick(function () { write(); });
}
process.stdout.on('error', function (er) {
console.error(er);
process.exit(42);
});
write();
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.