Re: Handling invalid objects
- From: Simon Wright <simon@xxxxxxxxxxxx>
- Date: Sun, 19 Mar 2006 11:00:04 +0000
Justin Gombos <rpbkbq.xax.gld@xxxxxxxx> writes:
Exception raising and handling is often viewed as writing code that
will never execute. Predefined exceptions must be handled when
there is an expectation they will be raised, but their usefullness
stops there. Beyond that, it's like writing erroneous code on
purpose.
Code that _should_ never execute, perhaps!
Exceptions are for things that can't be handled locally because of
lack of application knowledge. For example, how to handle a
Socket_Error?
And also, I think, for contract violation, where the contract can;t be
enforced in the language. Now we can say 'not null access' but in
Ada95 we can't.
There are cases where exceptions are outlawed; most of them are not
justified. Even if they were all justified, advocating a return to
the mess that error codes create is not a viable option.
It's a mess regardless. Clearly Ada is deficient in this respect,
as all languages seem to be.
I think it's called living in the real world.
.
- References:
- private types
- From: ada_student
- Re: private types
- From: Jeffrey R. Carter
- Re: private types
- From: Brian May
- Re: private types
- From: Justin Gombos
- Re: private types
- From: Maciej Sobczak
- Re: private types
- From: Justin Gombos
- Re: private types
- From: Randy Brukardt
- Handling invalid objects
- From: Justin Gombos
- Re: Handling invalid objects
- From: Jeffrey R. Carter
- Re: Handling invalid objects
- From: Justin Gombos
- private types
- Prev by Date: Re: [gnuada] gcc 4.1.0 available
- Next by Date: Re: Library file locations (was: Debian Policy for Ada, Second Edition)
- Previous by thread: Re: Handling invalid objects
- Next by thread: Re: Handling invalid objects
- Index(es):
Relevant Pages
|