[Catalyst-commits] r9709 - Catalyst-Runtime/5.80/trunk/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Wed Apr 15 14:02:41 GMT 2009


Author: t0m
Date: 2009-04-15 15:02:41 +0100 (Wed, 15 Apr 2009)
New Revision: 9709

Modified:
   Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
And print the value.


Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2009-04-15 13:57:36 UTC (rev 9708)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2009-04-15 14:02:41 UTC (rev 9709)
@@ -2185,9 +2185,10 @@
         my $metaclass = Moose::Util::find_meta($component);
         my $method_meta = $metaclass->find_method_by_name('COMPONENT');
         my $component_method_from = $method_meta->associated_metaclass->name;
+        my $value = defined($instance) ? $instance : 'undef';
         Catalyst::Exception->throw(
             message =>
-            qq/Couldn't instantiate component "$component", COMPONENT() method (from $component_method_from) didn't return an object-like value./
+            qq/Couldn't instantiate component "$component", COMPONENT() method (from $component_method_from) didn't return an object-like value (value was $value)./
         );
     }
     return $instance;




More information about the Catalyst-commits mailing list