29/10/23 - Corrección de ErrorManager

- Se corrigio el código de errorManager para que guarde y envie correctamente los errores a la tabla PushInfo
This commit is contained in:
2023-10-29 19:52:52 -06:00
parent b42ce5947a
commit 626a4eb59c
7 changed files with 20 additions and 12 deletions

View File

@@ -106,15 +106,18 @@ End Sub
'Return true to allow the OS default exceptions handler to handle the uncaught exception. 'Para los Logs
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
'wait for 500ms to allow the logs to be updated.
Log("::::::::::::::::::::: ERROR")
Dim jo As JavaObject
Dim l As Long = 500: jo.InitializeStatic("java.lang.Thread").RunMethod("sleep", Array(l)) 'Sleep 500ms
logcat.LogCatStop
logs.Initialize
logs.Append("Ver " & Application.VersionName & CRLF)
logs.Append("R:" & rutaV & CRLF)
logs.Append("R:" & Subs.traeRuta & CRLF)
logs.Append(StackTrace)
Subs.revisaBD
Subs.errorLog.ExecNonQuery2("INSERT INTO errores(fecha, error) VALUES (?,?)", Array As Object (Subs.fechaKMT(DateTime.now), logs))
LogColor(logs, Colors.blue)
errorLog.ExecNonQuery($"INSERT INTO errores(fecha, error) VALUES ('${Subs.fechaKMT(DateTime.now)}', '${logs}')"$)
LogColor("insertamos Error", Colors.red)
StartActivity(errorManager)
Return True
End Sub