[fpc-pascal] using exceptions

ik idokan at gmail.com
Mon Dec 19 20:53:47 CET 2011


Hello,

Exceptions like the name suggested, is to mark something that you are not
suppose to expect.
For example while getting a data something went wrong, like disconnection,
wrong size of data etc...

The usage of exception is very costly in performance, and there for should
use only on specific events imho.

But we use exceptions even on places such as StrToInt, when the string is
not an integer number, but we can expect to either have a number or
something else. So why use an exception there ?

What do you think on this subject ? How would you choose when or where to
use exceptions and why there ?

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111219/13ba1a8f/attachment.html>


More information about the fpc-pascal mailing list