line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Podman::Exception; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
60238
|
use Mojo::Base 'Mojo::Exception'; |
|
8
|
|
|
|
|
161959
|
|
|
8
|
|
|
|
|
46
|
|
4
|
|
|
|
|
|
|
|
5
|
8
|
|
|
|
|
1351
|
use constant MESSAGE => { |
6
|
|
|
|
|
|
|
900 => 'Connection failed.', |
7
|
|
|
|
|
|
|
304 => 'Action already processing.', |
8
|
|
|
|
|
|
|
400 => 'Bad parameter in request.', |
9
|
|
|
|
|
|
|
404 => 'No such item.', |
10
|
|
|
|
|
|
|
405 => 'Bad request.', |
11
|
|
|
|
|
|
|
409 => 'Conflict error in operation.', |
12
|
|
|
|
|
|
|
500 => 'Internal server error.', |
13
|
8
|
|
|
8
|
|
3509
|
}; |
|
8
|
|
|
|
|
14
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'code' => -1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
10
|
|
|
10
|
1
|
6027
|
my ($self, $code) = @_; |
19
|
|
|
|
|
|
|
|
20
|
10
|
50
|
|
|
|
34
|
return $self->SUPER::new unless $code; |
21
|
10
|
|
100
|
|
|
73
|
return $self->SUPER::new(MESSAGE->{$code} // 'Unknown error.')->code($code); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |