diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm index 11c108d65d2d5ed9c44fe7a3a6b97b1f5561bd30..62bdc6a46fdccb0907c80b5e26297828d7bd680f 100755 --- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm @@ -916,26 +916,18 @@ sub AUTOLOAD { } else { throw( sprintf( "Could not work out type for %s\n", $AUTOLOAD ) ); } - my $ret = - $reg->get_adaptor( $self->species(), $self->group(), $type ); - - if ($ret) { - - return $ret; - - } else { - warning( - sprintf( - "Could not find %s adaptor in the registry for %s %s\n", - $type, $self->species(), $self->group() ) ); - - throw( sprintf( "Could not get adaptor %s for %s %s\n", - $type, $self->species(), $self->group() ) ); + + my $ret = $reg->get_adaptor( $self->species(), $self->group(), $type ); - return $ret; - } + return $ret if $ret; + + warning( sprintf( + "Could not find %s adaptor in the registry for %s %s\n", + $type, $self->species(), $self->group() ) ); - die( sprintf( "No such method: %s\n", $AUTOLOAD ) ); + throw( sprintf( + "Could not get adaptor %s for %s %s\n", + $type, $self->species(), $self->group() ) ); } ## end sub AUTOLOAD