[Bast-commits] r3492 - in
branches/DBIx-Class-current/lib/DBIx/Class: . Storage/DBI/Oracle
blblack at dev.catalyst.perl.org
blblack at dev.catalyst.perl.org
Tue Jun 12 08:46:51 GMT 2007
Author: blblack
Date: 2007-06-12 08:46:50 +0100 (Tue, 12 Jun 2007)
New Revision: 3492
Modified:
branches/DBIx-Class-current/lib/DBIx/Class/Row.pm
branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
Log:
small throw_exception fixes
Modified: branches/DBIx-Class-current/lib/DBIx/Class/Row.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Row.pm 2007-06-12 06:10:52 UTC (rev 3491)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Row.pm 2007-06-12 07:46:50 UTC (rev 3492)
@@ -674,7 +674,7 @@
sub throw_exception {
my $self=shift;
- if (ref $self && ref $self->result_source) {
+ if (ref $self && ref $self->result_source && $self->result_source->schema) {
$self->result_source->schema->throw_exception(@_);
} else {
croak(@_);
Modified: branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm 2007-06-12 06:10:52 UTC (rev 3491)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm 2007-06-12 07:46:50 UTC (rev 3492)
@@ -56,7 +56,7 @@
while (my ($insert_trigger) = $sth->fetchrow_array) {
return uc($1) if $insert_trigger =~ m!(\w+)\.nextval!i; # col name goes here???
}
- croak "Unable to find a sequence INSERT trigger on table '" . $source->name . "'.";
+ $self->throw_exception("Unable to find a sequence INSERT trigger on table '" . $source->name . "'.");
}
=head2 get_autoinc_seq
More information about the Bast-commits
mailing list