Skip to content

Loading…

if err.name is blank (not an Error instance), use sys.inspect #105

Open
wants to merge 1 commit into from

1 participant

@wadey

Sometimes something other than an Error object gets thrown. This patch will use sys.inspect to show what the err object is if err.name is missing (so you can see what it is instead of just seeing 'undefined').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/expresso
View
2 bin/expresso
@@ -735,7 +735,7 @@ function runFile(file, fn) {
function error(suite, test, err) {
++failures;
- var name = err.name,
+ var name = err.name || sys.inspect(err),
stack = err.stack ? err.stack.replace(err.name, '') : '',
label = test === 'uncaught'
? test
Something went wrong with that request. Please try again.