Re: Try/Catch
- Posted by jaygade Feb 10, 2015
- 4686 views
dcuny said...
This can't be caught with an error code:
a = s[BAD_INDEX]
Given that Euphoria relies on sequences heavily, this is a problem.
An error of this sort can't be recovered from with error codes.
- David
This kind of error should crash. It's an unrecoverable error/probable logic bug by definition.
if BAD_INDEX <= length(s) then a = s[BAD_INDEX] else -- handle error condition end if