graceful.js 265 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 var tmp = require('../lib/tmp'), spawn = require('./spawn'); var graceful = spawn.arg; if (graceful) { tmp.setGracefulCleanup(); } spawn.tmpFunction(function (err, name) { spawn.out(name, function () { throw new Error('Thrown on purpose'); }); });