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

DonManfred

Expert
Licensed User
Longtime User
Is there any way to create a routine to be executed before crashing no matter where it happened?
You should always create a new thread for your issues.

Posting to an old thread is a mistake. Especially in an 6 years old thread.
 
Upvote 0
Top