File Coverage

blib/lib/CloudFlare/Client/Exception/Upstream.pm
Criterion Covered Total %
statement 27 27 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 36 36 100.0


line stmt bran cond sub pod time code
1             package CloudFlare::Client::Exception::Upstream;
2             # ABSTRACT: Upstream CloudFlare API Exception
3              
4 5     5   32338 use strict; use warnings; no indirect 'FATAL'; use namespace::autoclean;
  5     5   7  
  5     5   181  
  5     5   20  
  5         6  
  5         152  
  5         20  
  5         6  
  5         56  
  5         241  
  5         6  
  5         35  
5 5     5   725 use mro 'c3';
  5         427  
  5         30  
6              
7 5     5   174 use Readonly;
  5         7  
  5         305  
8 5     5   457 use Moose; use MooseX::StrictConstructor;
  5     5   355243  
  5         33  
  5         26617  
  5         14428  
  5         36  
9 5     5   16440 use CloudFlare::Client::Types 'ErrorCode';
  5         10  
  5         79  
10              
11             our $VERSION = 'v0.55.3'; # VERSION
12              
13             extends 'Throwable::Error';
14              
15             has errorCode => (
16             is => 'ro',
17             isa => ErrorCode,);
18              
19             __PACKAGE__->meta->make_immutable;
20             1; # End of CloudFlare::Client::Exception::Upstream
21              
22             __END__
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             CloudFlare::Client::Exception::Upstream - Upstream CloudFlare API Exception
31              
32             =head1 VERSION
33              
34             version v0.55.3
35              
36             =head1 SYNOPSIS
37              
38             use CloudFlare::Client::Exception::Upstream;
39              
40             CloudFlare::Client::Exception::Upstream::->throw(
41             message => 'Bad things occured',
42             errorCode => 'E_MAXAPI',
43             );
44              
45             my $e = CloudFlare::Client::Exception::Upstream::->new(
46             message => 'Bad things happened',
47             errorcode => 'E_MAXAPI',
48             );
49             $e->throw;
50              
51             =head1 ATTRIBUTES
52              
53             =head2 message
54              
55             The error message thrown upstream, readonly
56              
57             =head2 errorCode
58              
59             The error code thrown upstream, readonly. Valid values are undef,
60             E_UNAUTH, E_INVLDINPUT or E_MAXAPI. Readonly
61              
62             =head1 METHODS
63              
64             =head2 throw
65              
66             On the class, throw a new exception
67              
68             CloudFlare::Client::Exception::Upstream::->throw(
69             message => 'Bad things occured',
70             errorCode => 'E_MAXAPI',
71             );
72             ...
73              
74             On an instance, throw that exception
75              
76             $e->throw;
77              
78             =head2 new
79              
80             Construct a new exception
81              
82             my $e = CloudFlare::Client::Exception::Upstream::->new(
83             message => 'Bad things happened',
84             errorcode => 'E_MAXAPI',
85             );
86              
87             =head1 SEE ALSO
88              
89             Please see those modules/websites for more information related to this module.
90              
91             =over 4
92              
93             =item *
94              
95             L<CloudFlare::Client|CloudFlare::Client>
96              
97             =back
98              
99             =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
100              
101             =head1 SUPPORT
102              
103             =head2 Perldoc
104              
105             You can find documentation for this module with the perldoc command.
106              
107             perldoc CloudFlare::Client::Exception::Upstream
108              
109             =head2 Websites
110              
111             The following websites have more information about this module, and may be of help to you. As always,
112             in addition to those websites please use your favorite search engine to discover more resources.
113              
114             =over 4
115              
116             =item *
117              
118             MetaCPAN
119              
120             A modern, open-source CPAN search engine, useful to view POD in HTML format.
121              
122             L<http://metacpan.org/release/CloudFlare-Client>
123              
124             =back
125              
126             =head2 Email
127              
128             You can email the author of this module at C<me+dev@peter-r.co.uk> asking for help with any problems you have.
129              
130             =head2 Source Code
131              
132             The code is open to the world, and available for you to hack on. Please feel free to browse it and play
133             with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
134             from your repository :)
135              
136             L<https://github.com/pwr22/cloudflare-client>
137              
138             git clone git://github.com/pwr22/cloudflare-client.git
139              
140             =head1 BUGS
141              
142             Please report any bugs or feature requests on the bugtracker website
143             https://github.com/pwr22/cloudflare-client/issues
144              
145             When submitting a bug or request, please include a test-file or a
146             patch to an existing test-file that illustrates the bug or desired
147             feature.
148              
149             =head1 AUTHOR
150              
151             Peter Roberts <me+dev@peter-r.co.uk>
152              
153             =head1 COPYRIGHT AND LICENSE
154              
155             This software is Copyright (c) 2015 by Peter Roberts.
156              
157             This is free software, licensed under:
158              
159             The MIT (X11) License
160              
161             =cut