Proposal: Extensible exceptions
Isaac Dupree
isaacdupree at charter.net
Sun Jul 6 17:32:02 EDT 2008
Henning Thielemann wrote:
>
> On Sun, 6 Jul 2008, David Menendez wrote:
>
>>> data DivideByZero = DivideByZero deriving (Show, Typeable)
>
> Maybe I annoy you with my distinction of errors and exceptions, but I
> consider DivideByZero a bad example for an exception, because it is more
> an error (I see it is used in the extensible exception paper anyway). A
> division by zero is not a problem that comes from the outside world like
> 'file does not exist'. In contrast to that, it's absolutely predictable:
> It occurs whenever you divide by zero. I'd thus call it a programming
> error.
Indeed, we should give some thought to which exceptions are programming
errors (divide by zero, assert-failure, error, but not Neil Mitchell's
abort...) and put them in a category. We should give some thought to
the hierarchy of exceptions we're establishing! I have some trouble
seeing from the patches what the hierarchy of exceptions will be; Ian
(or someone), could you describe what the current proposal is for that
hierarchy? (if it exists yet)
-Isaac
More information about the Libraries
mailing list