Wish More specific error messages

trueboss323

Active Member
Licensed User
Longtime User
I know that usually when program crashes it should tell you the line where it crashed. But in my case it's not very relevant. Here's what I mean.

My layout just appears as a single checkbox:
1588275243199.png

I will use Statemanager to save a setting , and the checkbox should set its value from the setting.

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("1")

    StateManager.SetSetting("hello",1)
    CheckBox1.Checked = StateManager.GetSetting("hello")

End Sub

Then it will crash with this error:


Not only it doesn't say what line (in Main) it crashed , but it also doesn't specify which exactly can't parse as boolean.

If I had many like this then it wouldn't be convenient.

So I would like it if it had something like this:

 
Last edited:
Reactions: Dey

JohnC

Expert
Licensed User
Longtime User
One of the two issues is easy to figure out...

but it also doesn't specify which exactly can't parse as boolean.
java.lang.RuntimeException: Cannot parse: 1 as boolean