From ca610291158d45c613c6ea524010adee43c02ba3 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 20 Sep 2016 11:51:40 +0200 Subject: ICE-7081 - JavaScript testsuite should install a global error handler --- js/test/Common/TestSuite.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/test') diff --git a/js/test/Common/TestSuite.js b/js/test/Common/TestSuite.js index 1c42f4edad4..41f5773202b 100644 --- a/js/test/Common/TestSuite.js +++ b/js/test/Common/TestSuite.js @@ -36,6 +36,17 @@ $(document).ready( } }; + window.onerror = function(msg, url, line, column, err) + { + var e = msg + " at " + url + ":" + line + ":" + column; + if(err) + { + e += "\n" + err.stack; + } + out.writeLine(e); + return false; + }; + var query = new URI(document.location.href).search(true); $("#language").val(query.language !== undefined ? query.language : "cpp"); -- cgit v1.2.3