TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Terry Westley <[log in to unmask]>
Thu, 20 Jun 2002 00:53:21 -0400
text/plain (38 lines)
> Interesting article at  I haven't read it
> all yet but there is a minor mention of Ada in the "First aid for faulty
> code:Correct by construction" sidebar.
> Britt

One of the biggest problems I encounter in software development that is
rarely discussed in these types of articles and forums is error handling.

Error handling is VERY difficult.  The problem is that often the programmer
has very little context of how serious a given error will turn out to be.

Let me offer an example...

In a radar simulation, lack of a radar cross section file results in
usage of a default, nominal value.  Should the operator be notified
of this or should it just go in the log file?  Is this a fatal error
or a warning or simply information for the operator?  It turns out
that the designer and programmer have no way of knowing.  Only the
operator knows.

What if the file exists but is not readable with the permissions
assigned to the operator running the simulation?  You get the picture.

Designers and programmers make decisions like this EVERY day with
very little data to go on.

How much software have you personally read (or written!) which doesn't
check error codes or do anything reasonable when it is checked?

I suggest that Ada exceptions provide very little assistance in this
area.  Ignoring or mishandling an exception is just about as easy to
do as ignoring or mishandling an error code.

Terry Westley
[log in to unmask]