line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::Error; |
2
|
|
|
|
|
|
|
$Net::Stripe::Error::VERSION = '0.42'; |
3
|
2
|
|
|
2
|
|
16
|
use Moose; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
18
|
|
4
|
|
|
|
|
|
|
with 'Throwable'; |
5
|
2
|
|
|
2
|
|
14635
|
use namespace::clean -except => 'meta'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
23
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: represent an error result from interacting with Stripe |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'type' => (is => 'ro', isa => 'Maybe[Str]', required => 1); |
10
|
|
|
|
|
|
|
has 'message' => (is => 'ro', isa => 'Maybe[Str]', required => 1); |
11
|
|
|
|
|
|
|
has 'code' => (is => 'ro', isa => 'Maybe[Str]'); |
12
|
|
|
|
|
|
|
has 'param' => (is => 'ro', isa => 'Maybe[Str]'); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use overload fallback => 1, |
15
|
|
|
|
|
|
|
'""' => sub { |
16
|
1
|
|
|
1
|
|
9
|
my $e = shift; |
17
|
1
|
|
|
|
|
2
|
my $msg = "Error: @{[$e->type]} - @{[$e->message]}"; |
|
1
|
|
|
|
|
29
|
|
|
1
|
|
|
|
|
28
|
|
18
|
1
|
50
|
|
|
|
29
|
$msg .= " On parameter: " . $e->param if $e->param; |
19
|
1
|
50
|
|
|
|
26
|
$msg .= "\nCard error: " . $e->code if $e->code; |
20
|
1
|
|
|
|
|
3
|
return $msg; |
21
|
2
|
|
|
2
|
|
1167
|
}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
37
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Net::Stripe::Error - represent an error result from interacting with Stripe |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 VERSION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
version 0.42 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 code |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Reader: code |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Type: Maybe[Str] |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 message |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Reader: message |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Type: Maybe[Str] |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This attribute is required. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 param |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Reader: param |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Type: Maybe[Str] |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 previous_exception |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Reader: previous_exception |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 type |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Reader: type |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Type: Maybe[Str] |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This attribute is required. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHORS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Luke Closs |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Rusty Conover |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=back |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
91
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |