From 8a515ae43af0dfb95f56351d2888b3d648fdf93b Mon Sep 17 00:00:00 2001 From: Vova Bilonenko Date: Wed, 16 Mar 2016 14:35:45 +0100 Subject: [PATCH] fix(reporters): Throwing error without loosing stack trace --- static/debug.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/debug.html b/static/debug.html index 75891f198..b39c2610d 100644 --- a/static/debug.html +++ b/static/debug.html @@ -36,7 +36,12 @@ window.console.log(msg + result.suite.join(' ') + ' ' + result.description); for (var i = 0; i < result.log.length; i++) { - window.console.error(result.log[i]); + //throwing error without loosing stack trace + (function (err) { + setTimeout(function() { + throw err; + }); + })(result.log[i]) } } : function() {}, loaded: function() {