Subject: | Moose::Exception public api |
Date: | Sat, 7 Jun 2014 12:17:25 -0500 |
To: | bugs-moose [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
firstly, I'd suggest a Role perhaps Moose::Throwable or
Moose::Exceptional that provides as much implementation as possible,
and composes into Moose::Exception. This role should document the
things that are hard/impossible to do in a role and how to accomplish
them. This is for cases where it might be a good idea to make an
object that can't be further subclassed "throwable"
I suggest this role provide a Throwable like interface, with things
like a throw method, so that we can do ClassName->throw( message =>
'...' ); or similar, this is in part due to PBP not liking die, but
also so you don't have to create a whole subclass for simple
exceptions
also a few additional generic exception types might be nice.
swapping the implementation of confess (that Moose Exports)' ' that's
returned to be synonymous for throwing a Moose::Exception with the
message set to the param would be awesome.
--
Caleb Cushing
http://xenoterracide.com
Calendar:
https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago