forked from verdnatura/hedera-web
Errores de logging solucionados
This commit is contained in:
parent
39e436e275
commit
a1d80a5f42
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.208-1) stable; urgency=low
|
hedera-web (1.211-1) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -237,9 +237,11 @@ Db.Conn.implement
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
this.signalEmit ('error', e);
|
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
this.signalEmit ('error', error);
|
||||||
|
|
||||||
if (callback)
|
if (callback)
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -14,9 +14,14 @@ Vn.Web =
|
||||||
|
|
||||||
,initialize: function ()
|
,initialize: function ()
|
||||||
{
|
{
|
||||||
window.onerror = function (error, a, b, c, d)
|
window.onerror = function (message, file, line)
|
||||||
{
|
{
|
||||||
this.errorHandler.bind (this, error);
|
var error = new Error (message);
|
||||||
|
error.fileName = file;
|
||||||
|
error.lineNumber = line;
|
||||||
|
|
||||||
|
Htk.Toast.showError (_('InternalError'));
|
||||||
|
this.notifyError (error);
|
||||||
}.bind (this);
|
}.bind (this);
|
||||||
|
|
||||||
this.loadingCount = 0;
|
this.loadingCount = 0;
|
||||||
|
@ -161,6 +166,22 @@ Vn.Web =
|
||||||
|
|
||||||
this.onFormChange ();
|
this.onFormChange ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
,notifyError: function (error)
|
||||||
|
{
|
||||||
|
if (error instanceof Error)
|
||||||
|
{
|
||||||
|
var httpRequest = new Vn.HttpRequest ()
|
||||||
|
httpRequest.add
|
||||||
|
({
|
||||||
|
'file': error.fileName
|
||||||
|
,'line': error.lineNumber
|
||||||
|
,'message': error.message
|
||||||
|
,'stack': error.stack
|
||||||
|
});
|
||||||
|
httpRequest.send ('log.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
,errorHandler: function (error)
|
,errorHandler: function (error)
|
||||||
{
|
{
|
||||||
|
@ -185,16 +206,7 @@ Vn.Web =
|
||||||
{
|
{
|
||||||
console.error (error);
|
console.error (error);
|
||||||
Htk.Toast.showError (_('InternalError'));
|
Htk.Toast.showError (_('InternalError'));
|
||||||
|
this.notifyError (error);
|
||||||
var httpRequest = new Vn.HttpRequest ()
|
|
||||||
httpRequest.add
|
|
||||||
({
|
|
||||||
'file': error.fileName
|
|
||||||
,'line': error.lineNumber
|
|
||||||
,'message': error.message
|
|
||||||
,'stack': error.stack
|
|
||||||
});
|
|
||||||
httpRequest.send ('log.php');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue