Filename | /var/www/foswikidev/core/lib/Foswiki/Contrib/JsonRpcContrib/Error.pm |
Statements | Executed 8 statements in 161µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 15µs | 27µs | BEGIN@19 | Foswiki::Contrib::JsonRpcContrib::Error::
1 | 1 | 1 | 11µs | 15µs | BEGIN@20 | Foswiki::Contrib::JsonRpcContrib::Error::
1 | 1 | 1 | 4µs | 4µs | BEGIN@22 | Foswiki::Contrib::JsonRpcContrib::Error::
0 | 0 | 0 | 0s | 0s | new | Foswiki::Contrib::JsonRpcContrib::Error::
0 | 0 | 0 | 0s | 0s | stringify | Foswiki::Contrib::JsonRpcContrib::Error::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # JSON-RPC for Foswiki | ||||
2 | # | ||||
3 | # Copyright (C) 2011-2015 Michael Daum http://michaeldaumconsulting.com | ||||
4 | # | ||||
5 | # This program is free software; you can redistribute it and/or | ||||
6 | # modify it under the terms of the GNU General Public License | ||||
7 | # as published by the Free Software Foundation; either version 2 | ||||
8 | # of the License, or (at your option) any later version. For | ||||
9 | # more details read LICENSE in the root of this distribution. | ||||
10 | # | ||||
11 | # This program is distributed in the hope that it will be useful, | ||||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||
14 | # | ||||
15 | # As per the GPL, removal of this notice is prohibited. | ||||
16 | |||||
17 | package Foswiki::Contrib::JsonRpcContrib::Error; | ||||
18 | |||||
19 | 2 | 26µs | 2 | 39µs | # spent 27µs (15+12) within Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@19 which was called:
# once (15µs+12µs) by Foswiki::Configure::Auth::BEGIN@7 at line 19 # spent 27µs making 1 call to Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@19
# spent 12µs making 1 call to strict::import |
20 | 2 | 24µs | 2 | 19µs | # spent 15µs (11+4) within Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@20 which was called:
# once (11µs+4µs) by Foswiki::Configure::Auth::BEGIN@7 at line 20 # spent 15µs making 1 call to Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@20
# spent 4µs making 1 call to warnings::import |
21 | |||||
22 | 2 | 100µs | 1 | 4µs | # spent 4µs within Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@22 which was called:
# once (4µs+0s) by Foswiki::Configure::Auth::BEGIN@7 at line 22 # spent 4µs making 1 call to Foswiki::Contrib::JsonRpcContrib::Error::BEGIN@22 |
23 | 1 | 8µs | our @ISA = ('Error'); # base class | ||
24 | |||||
25 | sub new { | ||||
26 | my ( $class, $code, $message ) = @_; | ||||
27 | |||||
28 | return $class->SUPER::new( | ||||
29 | code => $code, | ||||
30 | message => $message, | ||||
31 | ); | ||||
32 | } | ||||
33 | |||||
34 | sub stringify { | ||||
35 | my $this = shift; | ||||
36 | return "Error($this->{code}): $this->{message}"; | ||||
37 | } | ||||
38 | |||||
39 | 1 | 3µs | 1; | ||
40 |