line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::Error; |
2
|
|
|
|
|
|
|
$Net::Stripe::Error::VERSION = '0.41'; |
3
|
2
|
|
|
2
|
|
17
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
19
|
|
4
|
|
|
|
|
|
|
with 'Throwable'; |
5
|
2
|
|
|
2
|
|
14803
|
use namespace::clean -except => 'meta'; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
25
|
|
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
|
|
11
|
my $e = shift; |
17
|
1
|
|
|
|
|
2
|
my $msg = "Error: @{[$e->type]} - @{[$e->message]}"; |
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
29
|
|
18
|
1
|
50
|
|
|
|
29
|
$msg .= " On parameter: " . $e->param if $e->param; |
19
|
1
|
50
|
|
|
|
66
|
$msg .= "\nCard error: " . $e->code if $e->code; |
20
|
1
|
|
|
|
|
4
|
return $msg; |
21
|
2
|
|
|
2
|
|
1212
|
}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
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.41 |
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 |