line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Async::Webservice::DHL::Exception; |
2
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::VERSION = '1.2.1'; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::DIST = 'Net-Async-Webservice-DHL'; |
5
|
|
|
|
|
|
|
} |
6
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
303
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
{package Net::Async::Webservice::DHL::Exception::ConfigError; |
10
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::ConfigError::VERSION = '1.2.1'; |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::ConfigError::DIST = 'Net-Async-Webservice-DHL'; |
13
|
|
|
|
|
|
|
} |
14
|
4
|
|
|
4
|
|
26
|
use Moo; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
31
|
|
15
|
|
|
|
|
|
|
extends 'Net::Async::Webservice::Common::Exception'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has file => ( is => 'ro', required => 1 ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub as_string { |
22
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return 'Bad config file: %s, at %s', |
25
|
|
|
|
|
|
|
$self->file, |
26
|
|
|
|
|
|
|
$self->stack_trace->as_string; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
{package Net::Async::Webservice::DHL::Exception::DHLError; |
31
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::DHLError::VERSION = '1.2.1'; |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
$Net::Async::Webservice::DHL::Exception::DHLError::DIST = 'Net-Async-Webservice-DHL'; |
34
|
|
|
|
|
|
|
} |
35
|
4
|
|
|
4
|
|
1838
|
use Moo; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
28
|
|
36
|
|
|
|
|
|
|
extends 'Net::Async::Webservice::Common::Exception'; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has error => ( is => 'ro', required => 1 ); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub as_string { |
43
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $c = $self->error->{Condition}[0]; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
0
|
|
|
|
return sprintf 'DHL returned an error: %s, code %s, at %s', |
|
|
|
0
|
|
|
|
|
48
|
|
|
|
|
|
|
$c->{ConditionData}//'<undef>', |
49
|
|
|
|
|
|
|
$c->{ConditionCode}//'<undef>', |
50
|
|
|
|
|
|
|
$self->stack_trace->as_string; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=pod |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=encoding UTF-8 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Net::Async::Webservice::DHL::Exception |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 VERSION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
version 1.2.1 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
These classes are based on L<Throwable> and L<StackTrace::Auto>. The |
73
|
|
|
|
|
|
|
L</as_string> method should return something readable, with a full |
74
|
|
|
|
|
|
|
stack trace. Their base class is |
75
|
|
|
|
|
|
|
L<Net::Async::Webservice::Common::Exception>. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 NAME |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Net::Async::Webservice::DHL::Exception - exception classes for DHL |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 Classes |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 C<Net::Async::Webservice::DHL::Exception::ConfigError> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
exception thrown when the configuration file can't be parsed |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head3 Attributes |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head4 C<file> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
The name of the configuration file. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head3 Methods |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head4 C<as_string> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Mentions the file name, and gives the stack trace. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 C<Net::Async::Webservice::DHL::Exception::DHLError> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
exception thrown when DHL signals an error |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head3 Attributes |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head4 C<error> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
The error data structure extracted from the DHL response. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head3 Methods |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head4 C<as_string> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Mentions the description and code of the error, plus the stack trace. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 AUTHOR |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Net-a-porter. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
124
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=cut |