From fb47490648509279c352326c299e39fc81117a74 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 22 Mar 2016 15:49:32 -0700 Subject: [PATCH] Log uncaught global errors. --- test/driver.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/driver.js b/test/driver.js index 148a8c4b5..bc3e8e811 100644 --- a/test/driver.js +++ b/test/driver.js @@ -281,7 +281,10 @@ var Driver = (function DriverClosure() { run: function Driver_run() { var self = this; - + window.onerror = function(message, source, line, column, error) { + self._info('Error: ' + message + ' Script: ' + source + ' Line: ' + + line + ' Column: ' + column + ' StackTrace: ' + error); + }; this._info('User agent: ' + navigator.userAgent); this._log('Harness thinks this browser is "' + this.browser + '" with path "' + this.appPath + '"\n');