From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/02 Message-ID: #1/1 X-Deja-AN: 145429043 references: <4jp17p$17vn@watnews1.watson.ibm.com> <3160B2F1.260D@mcs.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-04-02T00:00:00+00:00 List-Id: In article <3160B2F1.260D@mcs.com>, Mike Young wrote: >This appears somewhat frightening to me, that I might catch exceptions >from unknown and unspecified source at any given moment. No, it's not that bad. The parent and child are synchronized at a known point. In any case, it's no worse than the current situation, which is that the exception is simply ignored, and the task silently disappears. At some later time ("any given moment!") some other task will probably try to communicate with the dead task, and this will cause *another* exception, or else a deadlock, depending on exactly how the communication is done. >...What exactly >should I do with this exception aside from terminating? Nothing. You would terminate, normally. And then you would debug the problem. My point is just that debugging is a lot easier if you can pinpoint the problem more closely to its true source. This is no different from *most* cases of raising an exception -- the normal response is to terminate the program. Then the programmer fixes the bug. In *some* applications it makes sense to handle all exceptions and try to be fault tolerant, but that's a very difficult thing to do properly, and usually is not done. For most exceptions in most programs you simply want to terminate the program. - Bob