Peter Scott writes:
>     try {
>         # fragile code
>     } catch Exception::IO with {
>         # handle IO exceptions
>     } catch Exception::Socket with {
>         # handle network exceptions
>     } otherwise {
>         # handle other exceptions
>     };

What would the difference between that and this be?

        try {
                # fragile code
        } catch {                       # catch ALL exceptions
            switch ($EXCEPTION->name) {
                case IO { ... }
                case Socket { ... }
            }
        }

The catch clause would catch all exceptions.  The one thrown would be
placed in a "global" $EXCEPTION variable.

> This is a strawman exception class hierarchy.  The merits of this RFC
> do not depend on this beign a good hierarchy, only on it being possible
> to find a reasonable one.

Is it really a hierarchy?  Must it be?  Your strawman looks more like
an enumeration to me.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to