B4J Question B4J trap error event in order to save some data ?

Pietro Pancino

Member
Licensed User
Longtime User
Hi all,

Is there a way to trapp error before B4J app crashed.
In fact, I need some to save data of the programm in order to restart with last data?

If anyone have an idea...

Actualy i am saving data each minutes, but it's not a good solution for the disk. :)
 

Star-Dust

Expert
Licensed User
Longtime User
you can send the log output to a file and capture the error
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
You could use a try - catch block if you know roughly where the app may crash.
Put your data saving routine in the catch block.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0

aeric

Expert
Licensed User
Longtime User
What could cause the error to occur? network issue?
 
Upvote 0

Chris2

Active Member
Licensed User
Longtime User
Can you do what you need to in the Application_Error sub?
 
Upvote 0
Top