Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

.done {
opacity: 0.5;
text-decoration: line-through;
}
@sudsy
sudsy / caught.js
Last active December 26, 2015 13:59 — forked from owenallenaz/caught.js
Showing that node.js domains do catch synchronous errors (caught.js). Showing that try catch can interfere with nodejs domains (notcaught.js).
var domain = require("domain");
var d = domain.create();
d.on("error", function() {
console.log("domain caught");
});
d.run(function() {
throw new Error("foo");