Client/Exception.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 11 / 11 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Client.pm ↑ Summary
1 package SimpleDB::Client::Exception;
2 {
3 1 $SimpleDB::Client::Exception::VERSION = '1.0600';
4 }
5  
6 =head1 NAME
7  
8 SimpleDB::Client::Exception - Exceptions thrown by SimpleDB::Client.
9  
10 =head1 VERSION
11  
12 version 1.0600
13  
14 =head1 DESCRIPTION
15  
16 A submclass of L<Exception::Class> that defines expcetions to be thrown through-out L<SimpleDB::Client> ojbects.
17  
18 =head1 EXCEPTIONS
19  
20 The following exceptions are available from this class.
21  
22 =head2 SimpleDB::Client::Exception
23  
24 A general error. Isa Exception::Class.
25  
26 =head2 SimpleDB::Client::Exception::Connection
27  
28 Thrown when exceptions occur connecting to the SimpleDB database at Amazon, or the memcached server. Isa SimpleDB::Client::Exception.
29  
30 =head3 status_code
31  
32 The HTTP status code returned.
33  
34 =head2 SimpleDB::Client::Exception::Response
35  
36 Isa SimpleDB::Client::Exception::Connection. Thrown when SimpleDB reports an error.
37  
38 =head3 error_code
39  
40 The error code returned from SimpleDB.
41  
42 =head3 request_id
43  
44 The request id as returned from SimpleDB.
45  
46 =head3 box_usage
47  
48 The storage usage in your SimpleDB.
49  
50 =head3 response
51  
52 The L<HTTP::Response> object as retrieved from the SimpleDB request.
53  
54 =cut
55  
56 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
57 1 ▶use Exception::Class (
Subroutine BEGIN: called CC=1 SCAR=0.0
58  
59 1 'SimpleDB::Client::Exception' => {
60 description => "A general error occured.",
61 },
62 'SimpleDB::Client::Exception::Connection' => {
63 isa => 'SimpleDB::Client::Exception',
64 description => "There was a problem establishing a connection.",
65 fields => ['status_code'],
66 },
67 'SimpleDB::Client::Exception::Response' => {
68 isa => 'SimpleDB::Client::Exception::Connection',
69 description => "The database reported an error.",
70 fields => ['error_code','request_id','box_usage','response'],
71 },
72  
73 1 );
74  
75 =head1 LEGAL
76  
77 SimpleDB::Client is Copyright 2009-2010 Plain Black Corporation (L<http://www.plainblack.com/>) and is licensed under the same terms as Perl itself.
78  
79 =cut
80  
81 1 1;
« Client.pm ↑ Summary