line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tatsumaki::Error; |
2
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
152
|
|
3
|
4
|
|
|
4
|
|
21
|
use Any::Moose; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
38
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub throw { |
6
|
2
|
|
|
2
|
0
|
6
|
my($class, @rest) = @_; |
7
|
2
|
|
|
|
|
36
|
die $class->new(@rest); |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Tatsumaki::Error::ClientDisconnect; |
11
|
4
|
|
|
4
|
|
2326
|
use Any::Moose; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
19
|
|
12
|
|
|
|
|
|
|
extends 'Tatsumaki::Error'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package Tatsumaki::Error::HTTP; |
15
|
4
|
|
|
4
|
|
2620
|
use Any::Moose; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
18
|
|
16
|
4
|
|
|
4
|
|
5220
|
use HTTP::Status; |
|
4
|
|
|
|
|
16848
|
|
|
4
|
|
|
|
|
1535
|
|
17
|
|
|
|
|
|
|
extends 'Tatsumaki::Error'; |
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
4
|
|
31
|
use overload q("") => sub { $_[0]->message }, fallback => 1; |
|
4
|
|
|
0
|
|
9
|
|
|
4
|
|
|
|
|
50
|
|
|
0
|
|
|
|
|
0
|
|
20
|
|
|
|
|
|
|
has code => (is => 'rw', isa => 'Int'); |
21
|
|
|
|
|
|
|
has message => (is => 'rw', isa => 'Str'); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
around BUILDARGS => sub { |
24
|
|
|
|
|
|
|
my $orig = shift; |
25
|
|
|
|
|
|
|
my($class, $code, $msg) = @_; |
26
|
|
|
|
|
|
|
$msg ||= HTTP::Status::status_message($code); |
27
|
|
|
|
|
|
|
$class->$orig(code => $code, message => $msg); |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
package Tatsumaki::Error; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|