comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Forcing Exception Handling
Date: Tue, 1 Mar 2011 18:11:28 -0600
Date: 2011-03-01T18:11:28-06:00	[thread overview]
Message-ID: <ikk1vk$5al$1@munin.nbi.dk> (raw)
In-Reply-To: 91988389-b17a-42cb-8f5b-9b1205604b55@y3g2000vbh.googlegroups.com

"iloAda" <egzgheib@gmail.com> 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.





  parent reply	other threads:[~2011-03-02  0:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 17:27 Forcing Exception Handling iloAda
2011-02-28 17:32 ` Simon Clubley
2011-02-28 18:33   ` onox
2011-02-28 19:10     ` Simon Clubley
2011-02-28 18:34   ` Vinzent Hoefler
2011-02-28 20:20 ` Florian Weimer
2011-02-28 20:35 ` Ludovic Brenta
2011-03-01  3:54   ` Randy Brukardt
2011-03-01  8:34     ` Dmitry A. Kazakov
2011-03-02  0:00       ` Randy Brukardt
2011-03-02  8:28         ` Dmitry A. Kazakov
2011-02-28 20:38 ` Georg Bauhaus
2011-03-01  0:19   ` Shark8
2011-03-01  8:56     ` Dmitry A. Kazakov
2011-03-01  9:34       ` iloAda
2011-03-01  9:47         ` Vinzent Hoefler
2011-03-01  9:51         ` Dmitry A. Kazakov
2011-03-01 10:07           ` iloAda
2011-03-01 13:27         ` Mark Lorenzen
2011-03-01 16:11         ` J-P. Rosen
2011-03-02  0:11         ` Randy Brukardt [this message]
2011-03-01 15:23       ` Shark8
2011-03-01 15:44         ` Dmitry A. Kazakov
2011-03-02  0:02       ` Randy Brukardt
2011-03-01  2:08 ` Hoàng Đình Long
2011-03-02 13:39 ` ytomino
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox