line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GeoIP2::Error::Generic; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
50
|
use strict; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
225
|
|
4
|
8
|
|
|
8
|
|
38
|
use warnings; |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
319
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '2.006002'; |
7
|
|
|
|
|
|
|
|
8
|
8
|
|
|
8
|
|
37
|
use Moo; |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
57
|
|
9
|
|
|
|
|
|
|
|
10
|
8
|
|
|
8
|
|
5730
|
use namespace::clean -except => 'meta'; |
|
8
|
|
|
|
|
63954
|
|
|
8
|
|
|
|
|
52
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'Throwable::Error'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
1; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# ABSTRACT: A generic exception |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=encoding UTF-8 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
GeoIP2::Error::Generic - A generic exception |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 VERSION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
version 2.006002 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
use 5.008; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use GeoIP2::WebService::Client; |
37
|
|
|
|
|
|
|
use Scalar::Util qw( blessed ); |
38
|
|
|
|
|
|
|
use Try::Tiny; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $client = GeoIP2::WebService::Client->new( |
41
|
|
|
|
|
|
|
account_id => 42, |
42
|
|
|
|
|
|
|
license_key => 'abcdef123456', |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
try { |
46
|
|
|
|
|
|
|
$client->insights( ip => '24.24.24.24' ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
catch { |
49
|
|
|
|
|
|
|
die $_ unless blessed $_; |
50
|
|
|
|
|
|
|
die $_ if $_->isa('GeoIP2::Error::Generic'); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# handle other exceptions |
53
|
|
|
|
|
|
|
}; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This class represents a generic error. It extends L<Throwable::Error> and does |
58
|
|
|
|
|
|
|
not add any additional attributes. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This class has two methods, C<< $error->message() >>, and C<< |
63
|
|
|
|
|
|
|
$error->stack_trace() >>. Both methods are inherited from L<Throwable::Error>. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SUPPORT |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/GeoIP2-perl/issues>. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHORS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=over 4 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Dave Rolsky <drolsky@maxmind.com> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item * |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Greg Oschwald <goschwald@maxmind.com> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item * |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Mark Fowler <mfowler@maxmind.com> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Olaf Alders <oalders@maxmind.com> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=back |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This software is copyright (c) 2013 - 2019 by MaxMind, Inc. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
96
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |