Proposal: Extensible exceptions

Henning Thielemann lemming at henning-thielemann.de
Thu Jul 10 01:53:05 EDT 2008


On Wed, 9 Jul 2008, Chris Smith wrote:

> Henning Thielemann wrote:
>> If your program is buggy, then it may well be that the file to unlock is
>> already unlocked and deleted.
>
> I think you're being a tad too simplistic here.  In large software
> systems, you get different perspectives on the code.  From your module,
> that division by zero error may be fatal; but from my module, which may
> have been developed independently and is responsible for managing a
> number of other third party code modules, I would like to find out that
> your code had an error, note it in some kind of log, and then run the
> next person's code.  That is, from my code, your programming errors were
> entirely anticipated "external" things that could go wrong.

Of course, what is an error for one part of the software, can be an 
exception for the next higher level. If a program crashes this is only an 
exception for the OS. But how does this justify the use of one handling 
system for both kinds of break mechanisms in one part of the software 
architecture?

> So, given that the distinction between "error" and "exception" is not
> absolutely, but often just depends on your perspective (and I do take
> that as a given), I'd call it very broken to have different mechanisms
> for each.

The program part that contains the error cannot do much in case it stepped 
into a bug. I enumerated some possibilities in previous mails. They are 
clearly distinct from the things to do when an exception occurs.


More information about the Libraries mailing list