Skip to content

Commit

Permalink
More informative error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fangly committed Oct 10, 2011
1 parent bab00a6 commit 22a1b41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Bio/SeqFeature/Annotated.pm
Expand Up @@ -719,7 +719,7 @@ sub attach_seq {
my ($self, $seq) = @_;

if ( ! ($seq && ref($seq) && $seq->isa("Bio::PrimarySeqI")) ) {
$self->throw("Must attach Bio::PrimarySeqI objects to SeqFeatures");
$self->throw("Must attach Bio::PrimarySeqI objects to SeqFeatures but got '".ref($seq)."'");
}

$self->{'seq'} = $seq;
Expand Down
2 changes: 1 addition & 1 deletion Bio/SeqFeature/Generic.pm
Expand Up @@ -586,7 +586,7 @@ sub attach_seq {
my ($self, $seq) = @_;

if ( ! ($seq && ref($seq) && $seq->isa("Bio::PrimarySeqI")) ) {
$self->throw("Must attach Bio::PrimarySeqI objects to SeqFeatures");
$self->throw("Must attach Bio::PrimarySeqI objects to SeqFeatures but got '".ref($seq)."'");
}

$self->{'_gsf_seq'} = $seq;
Expand Down

0 comments on commit 22a1b41

Please sign in to comment.