[Lazarus] Exception dialog
Samuel Herzog
sam_herzog at yahoo.com
Mon Mar 16 14:56:49 CET 2009
Oh, good point to discuss about the use of exceptions.
I use exceptions only for really "unexpected" things.
That a user will sometimes input wrong data must be expected by a programmer so
I do not treat this as an exception.
With unexpected things I mean all the things that are outside my code.
e.g.
try
FExcel := GetActiveOleObject('Excel.Application');
except
//do something
end;
________________________________
Von: Michael Van Canneyt <michael.vancanneyt at wisa.be>
An: Lazarus mailing list <lazarus at lazarus.freepascal.org>
Gesendet: Montag, den 16. März 2009, 14:14:56 Uhr
Betreff: [Lazarus] Exception dialog
Hello,
Is there a reason why the default exception dialog has a cancel
button to kill the application ?
We often use an exception to signal wrong entry of data or so,
because it stops all further processing.
If the user then uses the cancel button, the program is simply
ended, which is not what we (or better: the users) want.
And I imagine many others use this technique.
I have overridden the OnException handler of TApplication,
so it's no longer a problem, but I was curious as to why this
is done like this by default ?
Michael.
_______________________________________________
Lazarus mailing list
Lazarus at lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090316/29b172d7/attachment-0007.html>
More information about the Lazarus
mailing list