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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.tiscali.fr!fr.colt.net!colt.net!feeder.news-service.com!feeder.news-service.com!peer.news.zetnet.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Exceptions Date: Fri, 07 Dec 2007 18:56:31 +0000 Organization: Pushface Message-ID: References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <47591e9b$0$16574$9b4e6d93@newsspool1.arcor-online.net> <8cc64d98-3488-4c29-ae95-fe7cf336ef88@w34g2000hsg.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1197053790 21802 62.49.19.209 (7 Dec 2007 18:56:30 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 7 Dec 2007 18:56:30 +0000 (UTC) Cancel-Lock: sha1:v8wlKTmLkLd4zdvUjYWWHpyjmYo= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:18768 Date: 2007-12-07T18:56:31+00:00 List-Id: shaunpatterson@gmail.com writes: > Well that is unfortunate. I use exception handlers when > appropriate... I cant say the same about the codemonkeys I work > with. It'd be nice to force them to catch. Someone upthread pointed out that forcing people to catch will often mean that they just suppress the exception, usually with disastrous results. I'd rather let unexpected exceptions propagate to some outer wrapper. The comment accompanying the subprogram spec should say 'may raise ...'. I've suggested in the past that a package/suite should only deliberately propagate exceptions that make sense in the context of the package/suite -- in other words, don't propagate GNAT.Sockets.Socket_Error if you're a web client and what you mean is that you've lost connection with a server. I'm not so sure about this now, because it makes it very awkward to debug (we usually just get the traceback, core dumps tricky on the target board). What I'd like is to be able to propagate my exception with the original callback info -- very compiler-specific, I would think.