sub EverySub()
' I do this in every single sub, in many places inside the sub
NomeSubXTrackErrors = "I am here 1, in this sub_name"
'some stuff here... (the sub code)
NomeSubXTrackErrors = "I am here 2, in this sub_name"
'something OK...
NomeSubXTrackErrors = "I am here 3, in this sub_name"
'the error:
dim i as integer
i="abcd"
' in old legacy debugger I got, big and screenshotable, this message:
' error in line number 17: i="abcd" not integer
'(ok, or something simlar)
NomeSubXTrackErrors = "I am here 4, in this sub_name"
end sub
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
' this traps the error I get in any sub
CallSub3("Main", "ShowError_Application_Error", Error, StackTrace)
Return False
End Sub
'in main
Public Sub ShowError_Application_Error (Error As Exception, StackTrace As String) As Boolean
MsgboxAsync ("Error about here" & _
" in " & NomeSubXTrackErrors & vbCrLf & vbCrLf & _
Error.Message & vbCrLf & vbCrLf & vbCrLf & _
"Stacktrace" & vbCrLf & _
StackTrace, "Errore")
'this gives a message, very hard to understand, related to java...
Return False
End Sub