B4J Question Prevent of app crash

bogdanc

Active Member
Licensed User
Longtime User
Hi All!
How to prevent to app crash.
I reading some values from website.
I use a timer to have some intervals of readings.

But I getting crash: Timer1_tick (java line....)

Ho to prevent crash of app?
 

Daestrum

Expert
Licensed User
Longtime User
You could use a try ... catch block
B4X:
Try
    ' do what you want here they may cause a crash
Catch
    Log("it broke")
End Try
...
 
Upvote 0

Chicao99

Member
Licensed User
Longtime User
Is there any way to create a routine to be executed before crashing no matter where it happened?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…