Fix exception text for nonexistent key in ResultSet::find()
Daniel Westermann-Clark [Mon, 20 Mar 2006 22:30:26 +0000 (22:30 +0000)]
Changes
lib/DBIx/Class/ResultSet.pm

diff --git a/Changes b/Changes
index 398f881..53d01f9 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@ Revision history for DBIx::Class
 0.05999_05
         - Fixup to columns_info_for when database returns type(size)
         - Made do_txn respect void context (on the off-chance somebody cares)
+        - Fix exception text for nonexistent key in ResultSet::find()
 
 0.05999_04
         - Fix for delete on full-table resultsets
index da955a4..da9dced 100644 (file)
@@ -252,7 +252,7 @@ sub find {
   my @cols = $self->result_source->primary_columns;
   if (exists $attrs->{key}) {
     my %uniq = $self->result_source->unique_constraints;
-    $self->throw_exception( "Unknown key $attrs->{key} on $self->name" )
+    $self->throw_exception( "Unknown key $attrs->{key} on '" . $self->result_source->name . "'" )
       unless exists $uniq{$attrs->{key}};
     @cols = @{ $uniq{$attrs->{key}} };
   }