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.
17 lines
401 B
17 lines
401 B
8 years ago
|
'use strict';
|
||
|
const assert = require('assert');
|
||
|
const http = require('http');
|
||
|
const common = require('../common');
|
||
|
|
||
|
// not exists host
|
||
|
const host = '*'.repeat(256);
|
||
|
const req = http.get({ host });
|
||
|
const err = new Error('mock unexpected code error');
|
||
|
req.on('error', common.mustCall(() => {
|
||
|
throw err;
|
||
|
}));
|
||
|
|
||
|
process.on('uncaughtException', common.mustCall((e) => {
|
||
|
assert.strictEqual(e, err);
|
||
|
}));
|