Re: Try/Catch

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

Continue...

Raw example for 'Specifications':

Routine foo() returns an integer, so, using Specifications to avoid exceptions can look like this:

function foo(sequence s) with spec -999
return length(s[1..$ - 5]) > 2
end function

i = foo(s) -- in case of exception in foo -999 is returned.

(very raw but just for example)

Design by Contract is just a start point - Euphoria developers are clever enough to continue.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu