X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FUtils.pm;h=c8422318d8cde2effd2c90cb038e148e6109554d;hp=50fb0c3dd574664c5f6cc4314d6387a1322d448e;hb=a2f2cde95194a17fe2401ae58c92b5494bac599f;hpb=ae4e40a7d5968d8086a86bff588a0989f167d5db diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index 50fb0c3..c842231 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -2,6 +2,7 @@ package Catalyst::Utils; use strict; use attributes (); +use Catalyst::Exception; use HTTP::Request; use Path::Class; use URI; @@ -155,7 +156,13 @@ sub reflect_actions { my $class = shift; my $actions = []; eval '$actions = $class->_action_cache'; - die qq/Couldn't reflect actions of component "$class", "$@"/ if $@; + + if ( $@ ) { + Catalyst::Exception->throw( + message => qq/Couldn't reflect actions of component "$class", "$@"/ + ); + } + return $actions; }