| It seems to come so naturally to you guys. |
It took years of work!
Also, what I showed you was just a contrived example as an illustration.
The underlying principle is this:
You have a high level procedure (or function) that is going to call a bunch of other
If any of them fail the whole sequence needs aborting.
Using exceptions allows you to jump right back to the master procedure/function
without having to write code that handles passing a failed situation along the line.
Also, using a try..except block allows you to determine the
logical place in your code to catch any exceptions that Delphi or
the O/S or some component might raise.
I hope I am explaining this understandably!
There are a lot more wrinkles/benefits; but I can not go into them all in one post.
Perhaps you can also read some explanations in official documentation or published books
Also keep asking questions.