3 * Window onerror handler.. reports to our logger.
7 Pman.OnJavascriptError = {
12 window.onerror = this.handler.createDelegate(this);
16 history : false, // array of previous events...
20 handler : function(msg, url, line, col, errorObj)
27 // note - some are not passed by all browsers.
29 var stack = errorObj ? errorObj.stack : false;
36 var f = arguments.callee.caller;
42 // 10 events max in 5 minutes
43 var last = this.history.length > 10 ? this.history.shift() : false;
44 if (last && last > (new Date()).add( Date.MINUTE, -5)) {
45 this.history.unshift(last); // put it back on, and ingore this error.
49 this.history.push(new Date());
58 url : baseURL + '/Core/JavascriptError',
63 source_url : window.location.toString(),
66 stack : '' + stack // array???
68 success : this.resetLock,
69 failure : this.resetLock
79 resetLock : function()
81 Pman.OnJavascriptError.lock = false;
85 Pman.OnJavascriptError.init();