Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...
Shian_Lee said...

Spock's smart error code which is available to the caller is the real thing. I would say that using only functions for retrieving the smart error code is even more mature. No need to wrap the whole program/plug-in with error handler. If it's that bad - then get rid of it.

The "smart error code" only works for a limited set of exceptions, ignores the most common cases, and continues to run code when Euphoria knows that the results will be wrong.

Since incorrect indexes are the most common exception in Euphoria, you're suggesting that we adopt a solution known to leave the majority of use cases in place.

These claims are extremely confused.

Smart Status Code can be activated in any called routine/operation that might care to throw an error. It is a lot like the error codes of the GO language (which abhors exceptions). The returned code can indicate different levels of severity. The most severe ones will prompt the compiler to insist that the caller handle it. This could mean correcting the bad data OR propagating the error up to the next calling level OR even resetting the status code.

The implication that Exceptions can somehow handle bad indexes better than SSC is just a red herring.

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu