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, LOTS_OF_MONEY,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,790d824907970cc3 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Exception Propagation Date: 1999/06/09 Message-ID: <7jlud1$l76$1@nnrp1.deja.com>#1/1 X-Deja-AN: 487492800 References: <7jjbl4$n79$1@nnrp1.deja.com> <7jh857$ej$1@nnrp1.deja.com> <375CC549.7EDFB885@spam.com> <0nc73.5376$y6.3195132@WReNphoon3> X-Http-Proxy: 1.0 x33.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Wed Jun 09 14:40:34 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-06-09T00:00:00+00:00 List-Id: In article <0nc73.5376$y6.3195132@WReNphoon3>, cdecker@snet.net (Decker, Christian R) wrote: > OK, everyone is mis-understanding my question, and i apologize..... > I understand that when an exception is raised in a task that it is not > deterministic as to where the exception gets > propagated as far as being able to trap and handle it. There certianly is a misunderstanding here. I hope I didn't cause it. What I was trying to say is that an exception is *not* propagated into any task other than the one it occurred in (except in a rendezvous). If I were to create language TERD, which did have that behavior, then in TERD it would be completly non-deterministic in the parent task where an exception raised from the child task popped up. Therefore there would be no good way to handle and recover from exceptions in child tasks. That's probably one reason why the designers of Ada did not do that! In Ada tasks can only get exceptions from themselves or from tasks they rendezvous with during the rendezvous. That makes it quite deterministic. As for warning you that a task died, in my experinece most compilers do *not* do that. Whether that is from concerns about synchronizing writes to standard output, or from sheer lazieness I can't say. But I know that both Gnat and GreenHills behave that way, and I suspect ObjectAda does as well. If you *do* write such code in last-ditch handlers on your tasks, make sure to handle the IO synchronization problem yourself, or you are liable to get interspersed output, or different exceptions than the ones you are looking for. -- T.E.D. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.