Profile of /data/SimpleDB-Class/author.t/../lib/SimpleDB/Class/Exception.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 05.Domain_and_Item.t
Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:23 2010

File | /data/SimpleDB-Class/author.t/../lib/SimpleDB/Class/Exception.pm
Statements Executed | 7
Statement Execution Time | 214µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 917µs | 7.43ms | SimpleDB::Class::Exception::::BEGIN@46SimpleDB::Class::Exception::BEGIN@46
1 | 1 | 1 | 28µs | 31µs | SimpleDB::Class::Exception::::BEGIN@45SimpleDB::Class::Exception::BEGIN@45

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package SimpleDB::Class::Exception;
2 |  |  |  |  |
3 |  |  |  |  | =head1 NAME
4 |  |  |  |  |
5 |  |  |  |  | SimpleDB::Class::Exception - Exceptions thrown by SimpleDB::Class.
6 |  |  |  |  |
7 |  |  |  |  | =head1 DESCRIPTION
8 |  |  |  |  |
9 |  |  |  |  | A submclass of L<Exception::Class> that defines expcetions to be thrown through-out L<SimpleDB::Class> ojbects.
10 |  |  |  |  |
11 |  |  |  |  | =head1 EXCEPTIONS
12 |  |  |  |  |
13 |  |  |  |  | The following exceptions are available from this class.
14 |  |  |  |  |
15 |  |  |  |  | =head2 SimpleDB::Class::Exception
16 |  |  |  |  |
17 |  |  |  |  | A general error. Isa Exception::Class.
18 |  |  |  |  |
19 |  |  |  |  | =head2 SimpleDB::Class::Exception::ObjectNotFound
20 |  |  |  |  |
21 |  |  |  |  | Thrown when a request object is not found.
22 |  |  |  |  |
23 |  |  |  |  | =head3 id
24 |  |  |  |  |
25 |  |  |  |  | The id of the requested object.
26 |  |  |  |  |
27 |  |  |  |  | =head2 SimpleDB::Class::Exception::InvalidParam
28 |  |  |  |  |
29 |  |  |  |  | Thrown when a parameter isn't passed when it should have been, or if it's left undefined. Isa SimpleDB::Class::Exception::ObjectNotFound.
30 |  |  |  |  |
31 |  |  |  |  | =head2 SimpleDB::Class::Exception::InvalidObject
32 |  |  |  |  |
33 |  |  |  |  | Thrown when a request object is found, but is corrupt. Isa SimpleDB::Class::Exception::ObjectNotFound.
34 |  |  |  |  |
35 |  |  |  |  | =head2 SimpleDB::Class::Exception::Connection
36 |  |  |  |  |
37 |  |  |  |  | Thrown when exceptions occur connecting to the SimpleDB database at Amazon, or the memcached server. Isa SimpleDB::Class::Exception.
38 |  |  |  |  |
39 |  |  |  |  | =head3 status_code
40 |  |  |  |  |
41 |  |  |  |  | The HTTP status code returned.
42 |  |  |  |  |
43 |  |  |  |  | =cut
44 |  |  |  |  |
45 | 3 | 65µs | 2 | 34µs | # spent 31µs (28+3) within SimpleDB::Class::Exception::BEGIN@45 which was called # once (28µs+3µs) by SimpleDB::Class::Cache::BEGIN@30 at line 45 use strict; # spent 31µs making 1 call to SimpleDB::Class::Exception::BEGIN@45 # spent 3µs making 1 call to strict::import
46 |  |  |  |  | # spent 7.43ms (917µs+6.51) within SimpleDB::Class::Exception::BEGIN@46 which was called # once (917µs+6.51ms) by SimpleDB::Class::Cache::BEGIN@30 at line 71 use Exception::Class (
47 |  |  |  |  |
48 |  |  |  |  | 'SimpleDB::Class::Exception' => { # spent 863µs making 1 call to Exception::Class::import
49 |  |  |  |  | description => "A general error occured.",
50 |  |  |  |  | },
51 |  |  |  |  | 'SimpleDB::Class::Exception::InvalidParam' => {
52 |  |  |  |  | isa => 'SimpleDB::Class::Exception',
53 |  |  |  |  | description => 'This method should be overridden by subclasses.',
54 |  |  |  |  | fields => ['name', 'value'],
55 |  |  |  |  | },
56 |  |  |  |  | 'SimpleDB::Class::Exception::ObjectNotFound' => {
57 |  |  |  |  | isa => 'SimpleDB::Class::Exception',
58 |  |  |  |  | description => "The object you were trying to retrieve does not exist.",
59 |  |  |  |  | fields => ['id'],
60 |  |  |  |  | },
61 |  |  |  |  | 'SimpleDB::Class::Exception::InvalidObject' => {
62 |  |  |  |  | isa => 'SimpleDB::Class::Exception::ObjectNotFound',
63 |  |  |  |  | description => "The object you were trying to retrieve does not exist.",
64 |  |  |  |  | },
65 |  |  |  |  | 'SimpleDB::Class::Exception::Connection' => {
66 |  |  |  |  | isa => 'SimpleDB::Class::Exception',
67 |  |  |  |  | description => "There was a problem establishing a connection.",
68 |  |  |  |  | fields => ['status_code'],
69 |  |  |  |  | },
70 |  |  |  |  |
71 | 3 | 146µs | 1 | 7.43ms | ); # spent 7.43ms making 1 call to SimpleDB::Class::Exception::BEGIN@46
72 |  |  |  |  |
73 |  |  |  |  | =head1 LEGAL
74 |  |  |  |  |
75 |  |  |  |  | SimpleDB::Class 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;