mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
435 B
22 lines
435 B
12 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
|
var events = require('events');
|
||
|
var domain = require('domain');
|
||
|
|
||
|
var errorCatched = false;
|
||
|
|
||
|
var e = new events.EventEmitter();
|
||
|
|
||
|
var d = domain.create();
|
||
|
d.add(e);
|
||
|
d.on('error', function (er) {
|
||
11 years ago
|
assert(er instanceof Error, 'error created');
|
||
12 years ago
|
errorCatched = true;
|
||
|
});
|
||
|
|
||
|
e.emit('error');
|
||
|
|
||
|
process.on('exit', function () {
|
||
11 years ago
|
assert(errorCatched, 'error got caught');
|
||
12 years ago
|
});
|