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