develooper Front page | perl.perl6.language.errors | Postings from August 2000

Re: On the case for exception-based error handling.

Thread Previous | Thread Next
From:
Tony Olekshy
Date:
August 24, 2000 17:08
Subject:
Re: On the case for exception-based error handling.
Message ID:
39A5B8C8.94502B44@avrasoft.com
Peter Scott wrote:
>
> Tony Olekshy wrote:
> >
> > I just don't think that with with respect to the infrastructure
> > mechanism per se, "fatality" should have anything to do with it.
> > In the end, that's a judgement call; that's what we get paid the
> > big bux for ;-)
>
> I have reservations about the 'severity' tag for just this reason.

While it is true that *any* throw-time categorization scheme may or
may not be useful to the catcher, that doesn't completely preclude
a related set of functions from defining a set of severity values
for an Exception class sub-hierarchy that "make sense" in practice.

    catch $@->isa("Exception::CORE") && $@->{severity} eq "fatal"

This is properly the matter of RFC 80 (for builtins) and for package
authors (should they want to define an exception class sub-hierarchy).
I'm pretty sure that I'll be happy with anything you come up with
there, as long as it isa Exception.

One of the inevitable results of making a generalized extensible
mechanism available to people is that they will find ways to abuse
it.  That's no argument against careful use.

Yours, &c, Tony Olekshy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About