node/test/parallel/test-exception-handler2.js
Rich Trott 48ecc0b6b5 test,tools: enable linting for undefined vars
The test directory had linting for undefined variables disabled. It is
enabled everywhere else in the code base. Let's disable the fule for
individual lines in the handful of tests that use undefined variables.

PR-URL: https://github.com/nodejs/node/pull/6255
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-20 16:52:25 -07:00

15 lines
380 B
JavaScript

'use strict';
const common = require('../common');
process.on('uncaughtException', function(err) {
console.log('Caught exception: ' + err);
});
setTimeout(common.mustCall(function() {
console.log('This will still run.');
}), 50);
// Intentionally cause an exception, but don't catch it.
nonexistentFunc(); // eslint-disable-line no-undef
common.fail('This will not run.');