blib/lib/MogileFS/Exception.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 11 | 54.5 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 5 | 40.0 |
pod | 0 | 3 | 0.0 |
total | 8 | 19 | 42.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MogileFS::Exception; | ||||||
2 | 22 | 22 | 118 | use strict; | |||
22 | 35 | ||||||
22 | 509 | ||||||
3 | 22 | 22 | 87 | use warnings; | |||
22 | 29 | ||||||
22 | 2102 | ||||||
4 | |||||||
5 | sub new { | ||||||
6 | 0 | 0 | 0 | my ($class, $errcode) = @_; | |||
7 | 0 | return bless { | |||||
8 | code => $errcode, | ||||||
9 | }, $class; | ||||||
10 | } | ||||||
11 | |||||||
12 | sub throw { | ||||||
13 | 0 | 0 | 0 | my $self = shift; | |||
14 | 0 | die $self; | |||||
15 | } | ||||||
16 | |||||||
17 | 0 | 0 | 0 | sub code { $_[0]{code} } | |||
18 | |||||||
19 | 1; |