aboutsummaryrefslogtreecommitdiff
path: root/test/sandbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/sandbox.js')
-rw-r--r--test/sandbox.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sandbox.js b/test/sandbox.js
index ea3a60a5..894349fb 100644
--- a/test/sandbox.js
+++ b/test/sandbox.js
@@ -29,7 +29,7 @@ exports.run_code = function(code) {
console: {
log: function() {
return console.log.apply(console, [].map.call(arguments, function(arg) {
- return typeof arg == "function" ? arg.toString() : arg;
+ return typeof arg == "function" || arg && /Error$/.test(arg.name) ? arg.toString() : arg;
}));
}
}