X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FException%2FInterface.pm;h=5f0dbd1b0889e5cd39b51e7d4e57f1893924fe6a;hb=964bf130533c001789a80ef193f03d5c5f3817eb;hp=65d5a54a75dba838473817aee0fa25562ce240af;hpb=b6c6af73c35c442dea0ed179bfc6c73c49f6fc3e;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Exception/Interface.pm b/lib/Catalyst/Exception/Interface.pm index 65d5a54..5f0dbd1 100644 --- a/lib/Catalyst/Exception/Interface.pm +++ b/lib/Catalyst/Exception/Interface.pm @@ -1,6 +1,6 @@ package Catalyst::Exception::Interface; -use MooseX::Role::WithOverloading; +use Moose::Role; use namespace::clean -except => 'meta'; use overload @@ -15,22 +15,20 @@ __END__ =head1 NAME -Catalyst::Exception::Interface - Exception for redispatching using $ctx->detach() +Catalyst::Exception::Interface - Role defining the interface for Catalyst exceptions =head1 SYNOPSIS package My::Catalyst::Like::Exception; use Moose; use namespace::clean -except => 'meta'; - - # This comprises the required interface. - sub as_string { 'the exception text for stringification' } - sub die { shift; die @_ } - sub die { shift; die @_ } - + with 'Catalyst::Exception::Interface'; -See also L and L. + # This comprises the required interface. + sub as_string { 'the exception text for stringification' } + sub throw { shift; die @_ } + sub rethrow { shift; die @_ } =head1 DESCRIPTION @@ -40,9 +38,6 @@ It ensures that all exceptions follow the expected interface, and adds overloading for stringification when composed onto a class. -Note that if you compose this role onto another role, that role -must use L. - =head1 REQUIRED METHODS =head2 as_string @@ -57,6 +52,16 @@ must use L. Provided by Moose +=head1 SEE ALSO + +=over 4 + +=item L + +=item L + +=back + =head1 AUTHORS Catalyst Contributors, see Catalyst.pm