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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a4156f047b063f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Forcing Exception Handling Date: Tue, 1 Mar 2011 18:11:28 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <02901b13-da72-48ae-9cb3-bf1a10144c44@u3g2000vbe.googlegroups.com> <4d6c07c1$0$6885$9b4e6d93@newsspool2.arcor-online.net> <195bsgigtzacu$.13u18z09ptrtw$.dlg@40tude.net> <91988389-b17a-42cb-8f5b-9b1205604b55@y3g2000vbh.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1299024692 5461 69.95.181.76 (2 Mar 2011 00:11:32 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 2 Mar 2011 00:11:32 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-RFC2646: Format=Flowed; Original Xref: g2news2.google.com comp.lang.ada:18678 Date: 2011-03-01T18:11:28-06:00 List-Id: "iloAda" wrote in message news:91988389-b17a-42cb-8f5b-9b1205604b55@y3g2000vbh.googlegroups.com... ... >exception > When others => > -- Do something that will allow the system to keep on running > >have u guys done something like that before? Sure, for the spam filter and web server, each task has a handler like this at the outer level to log failures; then return a failure code to the caller. (For the web server, this returns a 503 code to the requester; for the spam filter, this causes the message to be quarantined for later hand-analysis -- and fixing of the bug that caused the crash.) This is done in a block inside of a loop so that the (worker) task still continues to be usable for processing other requests/messages. Both of these are "real-time" systems in that not answering a web request in a reasonable causes the requestor to get nothing (which is bad) or causes e-mail to get lost (which is bad). But the timing constraints are fairly loose; we have seconds (not milliseconds) to handle the problem. For the Janus/Ada compiler and tools, we used to have such handlers, but they covered up errors so well that we got rid of them. It's better for the compiler to just crash outright because that makes customers call us with a report right away rather than trying to figure out what went wrong. (And often we can figure out the bug just from the default error walkback and a bit of poking in the source code -- saves lots of debugging time.) Randy.