Re: Try/Catch
- Posted by jaygade Jan 01, 2015
- 6392 views
Euphoria has recoverable errors, you just have to check for them. "Get()" and "value()" are the best examples of that. Checking if a file exists is another.
Unrecoverable errors are ones where your program is wrong and is in an undefined state, so crashing is the correct behavior.
Edit: The nice thing about "defer" in Go code is that it puts the release of the resource close to the allocation of the resource, instead of at the bottom of a section of code.