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 | 8 | 8 | 45 | use strict; | |||
8 | 16 | ||||||
8 | 263 | ||||||
3 | 8 | 8 | 99 | use warnings; | |||
8 | 17 | ||||||
8 | 1076 | ||||||
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; |