Better recognition of error type.

This commit is contained in:
Richard Dodd 2019-01-16 15:36:13 +00:00
parent 5f2ba3f98e
commit b0906fddba

View File

@ -417,7 +417,7 @@ impl<'a> Context<'a> {
}
// errors
if (val instanceof Error) {
return `${className}: ${val.message}\n${val.stack}`;
return `${val.name}: ${val.message}\n${val.stack}`;
}
// TODO we could test for more things here, like `Set`s and `Map`s.
return className;