Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
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 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu