mirror of https://github.com/lukechilds/node.git
Browse Source
Previously, in the event of an unhandled error event, if the error is a not an actual Error, then a default error is thrown. Now, the argument is appended to the error message and added as the `context` property of the error. PR-URL: https://github.com/iojs/io.js/pull/1654 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>v2.0.2
Evan Lucas
10 years ago
2 changed files with 12 additions and 1 deletions
@ -0,0 +1,8 @@ |
|||||
|
var EventEmitter = require('events'); |
||||
|
var assert = require('assert'); |
||||
|
|
||||
|
var EE = new EventEmitter(); |
||||
|
|
||||
|
assert.throws(function() { |
||||
|
EE.emit('error', 'Accepts a string'); |
||||
|
}, /Accepts a string/); |
Loading…
Reference in new issue