mirror of
https://github.com/KeymonSoft/Gabinete-Roit.git
synced 2026-04-20 04:39:26 +00:00
- SE AGREGO CODIGO PARA EN ELNVIO DE ERRORES
This commit is contained in:
@@ -39,6 +39,9 @@ Sub Process_Globals
|
||||
Dim horacomin As String
|
||||
Dim horacomout As String
|
||||
Dim trabaja As Int
|
||||
'Para los Logs
|
||||
Dim logs As StringBuilder
|
||||
Private logcat As LogCat
|
||||
End Sub
|
||||
|
||||
Sub Service_Create
|
||||
@@ -61,8 +64,19 @@ Sub Service_TaskRemoved
|
||||
Timer1.Enabled = False
|
||||
End Sub
|
||||
|
||||
'Return true to allow the OS default exceptions handler to handle the uncaught exception.
|
||||
'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(Application.LabelName & " Ver " & Application.VersionName & CRLF)
|
||||
logs.Append(StackTrace)
|
||||
Subs.revisaBD
|
||||
Subs.errorLog.ExecNonQuery2("INSERT INTO errores(fecha, error) VALUES (?,?)", Array As Object (Subs.fechaKMT(DateTime.now), logs))
|
||||
StartActivity(errorManager)
|
||||
Return True
|
||||
End Sub
|
||||
|
||||
@@ -70,7 +84,6 @@ Sub Service_Destroy
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Timer1_Tick
|
||||
' ToastMessageShow("Timer",False)
|
||||
' If logger Then Log("Siguiente actuaizacion " & DateTime.Time(DateTime.Now + Interval * 1000))
|
||||
|
||||
Reference in New Issue
Block a user