Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkoichik <koichik@improvement.jp>2012-03-24 11:00:14 +0400
committerkoichik <koichik@improvement.jp>2012-07-29 14:48:16 +0400
commit72bc4dcda4cfa99ed064419e40d104bd1b2e0e25 (patch)
tree204279e05d8fec9b1c6706406e7f4637aca45de0 /lib
parentaa0650f4444c438d9538135a3707de3f2f313081 (diff)
assert: fix throws() throws an error without message property
Fixes #2893.
Diffstat (limited to 'lib')
-rw-r--r--lib/assert.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/assert.js b/lib/assert.js
index 50a6920a23e..70dc0b0eedc 100644
--- a/lib/assert.js
+++ b/lib/assert.js
@@ -306,11 +306,11 @@ function _throws(shouldThrow, block, expected, message) {
(message ? ' ' + message : '.');
if (shouldThrow && !actual) {
- fail('Missing expected exception' + message);
+ fail(actual, expected, 'Missing expected exception' + message);
}
if (!shouldThrow && expectedException(actual, expected)) {
- fail('Got unwanted exception' + message);
+ fail(actual, expected, 'Got unwanted exception' + message);
}
if ((shouldThrow && actual && expected &&