Branch Coverage

blib/lib/MongoDB/Error.pm
Criterion Covered Total %
branch 3 52 5.7


line true false branch
120 0 0 unless defined $self->error_labels
127 0 0 if $self->has_error_label($label)
134 0 300 if (&Scalar::Util::blessed($inv))
135 0 0 if @_
141 243 57 @_ == 1 ? :
172 0 0 if grep {$code == $_;} @retryable_codes
179 0 0 unless defined $message
180 0 0 if $message =~ /(not master|node is recovering)/i
188 0 0 if ($self->$MongoDB::Error::_can('result'))
189 0 0 if _check_is_retryable_code($self->result->last_code)
192 0 0 if ($self->$MongoDB::Error::_can('code'))
193 0 0 if _check_is_retryable_code($self->code)
196 0 0 if _check_is_retryable_message($self->message)
198 0 0 if ($self->$MongoDB::Error::_isa('MongoDB::WriteConcernError') and $self->result->$MongoDB::Error::_can('output'))
199 0 0 if _check_is_retryable_code($self->result->output->{'writeConcernError'}{'code'})
200 0 0 if _check_is_retryable_message($self->result->output->{'writeConcernError'}{'message'})
215 0 0 if grep {$code == $_;} @unknown_commit_codes
222 0 0 if $self->isa('MongoDB::ConnectionError') or $self->isa('MongoDB::SelectionError')
224 0 0 if $self->_is_retryable
226 0 0 if ($self->$MongoDB::Error::_can('result'))
227 0 0 if _check_is_unknown_commit_code($self->result->last_code)
230 0 0 if ($self->$MongoDB::Error::_can('code'))
231 0 0 if _check_is_unknown_commit_code($self->code)
239 0 0 if $self->isa('MongoDB::ConnectionError') or $self->isa('MongoDB::SelectionError')
246 0 0 if ($self->$MongoDB::Error::_can('code'))
247 0 0 if $self->code != 20