diff --git a/lib/format.js b/lib/format.js index 6f93cd46..99c7517a 100644 --- a/lib/format.js +++ b/lib/format.js @@ -20,7 +20,8 @@ define(function() { */ function formatError(e) { var s = typeof e === 'object' && e !== null && e.stack ? e.stack : formatObject(e); - return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; + var m = typeof e === 'object' && e !== null && e.message ? e.message + '\n' : ''; + return e instanceof Error ? m + s : s + ' (WARNING: non-Error used)'; } /**