Re: Try/Catch
- Posted by Shian_Lee Jan 11, 2015
- 5291 views
...One thing is quite visible from the examples above - to handle exceptions with Specifications - functions must be used, since functions are able to return error codes. I think that's fair enough and accepted condition and may be implemented and verified this way or another.
Edit: Cleaning up resources is not a simple issue anyway. But defining precisely the behaviour of 'Specifications' can eliminate over-complexity. For example, if Specifications can/cannot be applied to module level exceptions, or to procedures (not functions), etc.
Edit: If Specifications should only be applied to functions, then delete_routine() can solve the problem of clean up.
Adding top level statement such as 'without spec' is also valuable option for debugging the code.