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 | 89 | use strict; | |||
22 | 27 | ||||||
22 | 668 | ||||||
3 | 22 | 22 | 120 | use warnings; | |||
22 | 28 | ||||||
22 | 2273 | ||||||
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; |