On 15 Aug 2000, Perl6 RFC Librarian wrote:
> =head2 Exceptions
>
> Exceptions are objects belonging to some C<Exception> class. C<throw>ing
> an exception creates the object; therefore, C<EXCEPTION> above is just a
> class name. C<Error.pm> lets you subclass C<Error> to create them;
> C<Exception> appears to be a better name for a core functionality.
>
> The C<exception> function is just syntactic sugar for creating a new
> exception class;it merely amounts to C<@EXCEPTION::ISA = 'Exception'>.
I think its important to also provide some syntactic sugar for creating a
hierarchical structure more than 2 levels deep.
For example, I may have an Exception::Foo and then want an
Exception::Foo::DB subclass of it.
My Exception::Class module on CPAN is pretty much all about being able to
do this easily. It also implements a base exception but that's really for
convenience and isn't necessary.
-dave
/*==================
www.urth.org
We await the New Sun
==================*/