Delete JsError action

This commit is contained in:
RainLoop Team 2019-08-01 03:13:44 +03:00
parent 66b23747c7
commit 1b2306c7b0
4 changed files with 1 additions and 106 deletions

View file

@ -55,33 +55,6 @@ class AbstractApp extends AbstractBoot {
this.iframe = $('<iframe class="internal-hiddden" />').appendTo('body');
$win.on('error', (event) => {
if (
event &&
event.originalEvent &&
event.originalEvent.message &&
-1 ===
inArray(event.originalEvent.message, ['Script error.', 'Uncaught Error: Error calling method on NPObject.'])
) {
const time = timestamp();
if (this.lastErrorTime >= time) {
return;
}
this.lastErrorTime = time;
Remote.jsError(
noop,
event.originalEvent.message,
event.originalEvent.filename,
event.originalEvent.lineno,
window.location && window.location.toString ? window.location.toString() : '',
$html.attr('class'),
microtime() - startMicrotime
);
}
});
$win.on('resize', () => {
Events.pub('window.resize');
});

View file

@ -221,40 +221,6 @@ class AbstractAjaxRemote {
this.defaultRequest(fCallback, 'Noop');
}
/**
* @param {?Function} fCallback
* @param {string} sMessage
* @param {string} sFileName
* @param {number} iLineNo
* @param {string} sLocation
* @param {string} sHtmlCapa
* @param {number} iTime
*/
jsError(fCallback, sMessage, sFileName, iLineNo, sLocation, sHtmlCapa, iTime) {
this.defaultRequest(fCallback, 'JsError', {
'Message': sMessage,
'FileName': sFileName,
'LineNo': iLineNo,
'Location': sLocation,
'HtmlCapa': sHtmlCapa,
'TimeOnPage': iTime
});
}
/**
* @param {?Function} fCallback
* @param {string} sType
* @param {Array=} mData = null
* @param {boolean=} bIsError = false
*/
jsInfo(fCallback, sType, mData, bIsError = false) {
this.defaultRequest(fCallback, 'JsInfo', {
'Type': sType,
'Data': mData,
'IsError': bIsError ? '1' : '0'
});
}
/**
* @param {?Function} fCallback
*/