Hi,
i have a question about try-catch-blocks. I want to catch all errors and jump to a diagnostic-page. That´s working so far - but with a little limitation. I have my class-modules and my code modules. When i have a try-catch on my class and call a function from there which also have a try-catch and raises an error the outer catch fires. Can i prevent this?
Regards
i have a question about try-catch-blocks. I want to catch all errors and jump to a diagnostic-page. That´s working so far - but with a little limitation. I have my class-modules and my code modules. When i have a try-catch on my class and call a function from there which also have a try-catch and raises an error the outer catch fires. Can i prevent this?
B4X:
sub a()
Try
'do anything
result=codeModule.b
Catch
Dim ex As errorHandler = B4XPages.GetPage("errorhandler")
ex.showError("moduleA","sub_A",LastException) '<- this fires
End Try
end sub
...
sub b() as int
Try
'do anything
'raise error '<- here is an error
return anything
Catch
Dim ex As errorHandler = B4XPages.GetPage("errorhandler")
ex.showError("moduleB","sub_B",LastException) '<- this is what i want to see
End Try
end sub
Regards