File | /usr/local/lib/perl5/site_perl/5.10.1/SimpleDB/Client/Exception.pm |
Statements Executed | 8 |
Statement Execution Time | 96µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 15µs | 19µs | BEGIN@54 | SimpleDB::Client::Exception::
1 | 1 | 1 | 15µs | 671µs | BEGIN@55 | SimpleDB::Client::Exception::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package SimpleDB::Client::Exception; | ||||
2 | 1 | 300ns | our $VERSION = '1.0401'; | ||
3 | |||||
4 | =head1 NAME | ||||
5 | |||||
6 | SimpleDB::Client::Exception - Exceptions thrown by SimpleDB::Client. | ||||
7 | |||||
8 | =head1 VERSION | ||||
9 | |||||
10 | version 1.0401 | ||||
11 | |||||
12 | =head1 DESCRIPTION | ||||
13 | |||||
14 | A submclass of L<Exception::Class> that defines expcetions to be thrown through-out L<SimpleDB::Client> ojbects. | ||||
15 | |||||
16 | =head1 EXCEPTIONS | ||||
17 | |||||
18 | The following exceptions are available from this class. | ||||
19 | |||||
20 | =head2 SimpleDB::Client::Exception | ||||
21 | |||||
22 | A general error. Isa Exception::Class. | ||||
23 | |||||
24 | =head2 SimpleDB::Client::Exception::Connection | ||||
25 | |||||
26 | Thrown when exceptions occur connecting to the SimpleDB database at Amazon, or the memcached server. Isa SimpleDB::Client::Exception. | ||||
27 | |||||
28 | =head3 status_code | ||||
29 | |||||
30 | The HTTP status code returned. | ||||
31 | |||||
32 | =head2 SimpleDB::Client::Exception::Response | ||||
33 | |||||
34 | Isa SimpleDB::Client::Exception::Connection. Thrown when SimpleDB reports an error. | ||||
35 | |||||
36 | =head3 error_code | ||||
37 | |||||
38 | The error code returned from SimpleDB. | ||||
39 | |||||
40 | =head3 request_id | ||||
41 | |||||
42 | The request id as returned from SimpleDB. | ||||
43 | |||||
44 | =head3 box_usage | ||||
45 | |||||
46 | The storage usage in your SimpleDB. | ||||
47 | |||||
48 | =head3 response | ||||
49 | |||||
50 | The L<HTTP::Response> object as retrieved from the SimpleDB request. | ||||
51 | |||||
52 | =cut | ||||
53 | |||||
54 | 3 | 44µs | 2 | 22µs | # spent 19µs (15+3) within SimpleDB::Client::Exception::BEGIN@54 which was called
# once (15µs+3µs) by SimpleDB::Client::BEGIN@58 at line 54 # spent 19µs making 1 call to SimpleDB::Client::Exception::BEGIN@54
# spent 3µs making 1 call to strict::import |
55 | # spent 671µs (15+656) within SimpleDB::Client::Exception::BEGIN@55 which was called
# once (15µs+656µs) by SimpleDB::Client::BEGIN@58 at line 71 | ||||
56 | |||||
57 | 'SimpleDB::Client::Exception' => { # spent 656µs making 1 call to Exception::Class::import | ||||
58 | description => "A general error occured.", | ||||
59 | }, | ||||
60 | 'SimpleDB::Client::Exception::Connection' => { | ||||
61 | isa => 'SimpleDB::Client::Exception', | ||||
62 | description => "There was a problem establishing a connection.", | ||||
63 | fields => ['status_code'], | ||||
64 | }, | ||||
65 | 'SimpleDB::Client::Exception::Response' => { | ||||
66 | isa => 'SimpleDB::Client::Exception::Connection', | ||||
67 | description => "The database reported an error.", | ||||
68 | fields => ['error_code','request_id','box_usage','response'], | ||||
69 | }, | ||||
70 | |||||
71 | 3 | 49µs | 1 | 671µs | ); # spent 671µs making 1 call to SimpleDB::Client::Exception::BEGIN@55 |
72 | |||||
73 | =head1 LEGAL | ||||
74 | |||||
75 | SimpleDB::Client is Copyright 2009-2010 Plain Black Corporation (L<http://www.plainblack.com/>) and is licensed under the same terms as Perl itself. | ||||
76 | |||||
77 | =cut | ||||
78 | |||||
79 | 1 | 3µs | 1; |