Add a Moose::Exception class for future-proofing, etc
Shawn M Moore [Fri, 15 Jun 2012 18:10:41 +0000 (13:10 -0500)]
lib/Moose/Exception.pm [new file with mode: 0644]
lib/Moose/Util.pm

diff --git a/lib/Moose/Exception.pm b/lib/Moose/Exception.pm
new file mode 100644 (file)
index 0000000..88db761
--- /dev/null
@@ -0,0 +1,10 @@
+package Moose::Exception;
+use Moose;
+extends 'Throwable::Error';
+
+
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
+
index 2658ec8..a124283 100644 (file)
@@ -478,7 +478,7 @@ sub throw {
 
     my %args = @_;
 
-    my $superclass = delete($args{superclass}) || 'Throwable::Error';
+    my $superclass = delete($args{superclass}) || 'Moose::Exception';
     my $roles = delete($args{roles});
 
     my $metaclass;