Hello,
I would like to throw an exception as a means of breaking out of a series of loops as a check for something totally unexpected. I could not find an example or if this is even possible.
Here is some "dream" code. Is something like this possible in B4A? What is the correct syntax?
Thanks,
Barry.
I would like to throw an exception as a means of breaking out of a series of loops as a check for something totally unexpected. I could not find an example or if this is even possible.
Here is some "dream" code. Is something like this possible in B4A? What is the correct syntax?
B4X:
Try
.....
.....
.....
If (x < 0) Then Throw
.....
.....
.....
Catch
Log("This will never work.")
End Try
Thanks,
Barry.