← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:14 2015

Filename/var/www/foswikidev/core/lib/Foswiki/EngineException.pm
StatementsExecuted 9 statements in 209µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs25µsFoswiki::EngineException::::BEGIN@16Foswiki::EngineException::BEGIN@16
1119µs13µsFoswiki::EngineException::::BEGIN@17Foswiki::EngineException::BEGIN@17
1114µs4µsFoswiki::EngineException::::BEGIN@22Foswiki::EngineException::BEGIN@22
1113µs3µsFoswiki::EngineException::::BEGIN@19Foswiki::EngineException::BEGIN@19
0000s0sFoswiki::EngineException::::newFoswiki::EngineException::new
0000s0sFoswiki::EngineException::::stringifyFoswiki::EngineException::stringify
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2
3=begin TML
4
5---+ package Foswiki::EngineException
6
7Exception used to raise an engine related error. This exception has the
8following fields:
9 * =status= - status code to send to client
10 * =reason= a text string giving the reason for the refusal.
11
12=cut
13
14package Foswiki::EngineException;
15
16230µs237µs
# spent 25µs (12+12) within Foswiki::EngineException::BEGIN@16 which was called: # once (12µs+12µs) by Foswiki::UI::BEGIN@173 at line 16
use strict;
# spent 25µs making 1 call to Foswiki::EngineException::BEGIN@16 # spent 12µs making 1 call to strict::import
17222µs217µs
# spent 13µs (9+4) within Foswiki::EngineException::BEGIN@17 which was called: # once (9µs+4µs) by Foswiki::UI::BEGIN@173 at line 17
use warnings;
# spent 13µs making 1 call to Foswiki::EngineException::BEGIN@17 # spent 4µs making 1 call to warnings::import
18
19250µs13µs
# spent 3µs within Foswiki::EngineException::BEGIN@19 which was called: # once (3µs+0s) by Foswiki::UI::BEGIN@173 at line 19
use Error ();
# spent 3µs making 1 call to Foswiki::EngineException::BEGIN@19
2016µsour @ISA = ('Error');
21
22
# spent 4µs within Foswiki::EngineException::BEGIN@22 which was called: # once (4µs+0s) by Foswiki::UI::BEGIN@173 at line 27
BEGIN {
2314µs if ( $Foswiki::cfg{UseLocale} ) {
24 require locale;
25 import locale();
26 }
27195µs14µs}
# spent 4µs making 1 call to Foswiki::EngineException::BEGIN@22
28
29=begin TML
30
31---+ ClassMethod new( $status, $reason [, $response] )
32
33 * =$status= - status code to send to client
34 * =$reason= - string reason for failure
35 * =$response= - custom Foswiki::Response object to be sent to client. Optional.
36
37All the above fields are accessible from the object in a catch clause
38in the usual way e.g. =$e->{status}= and =$e->{reason}=
39
40=cut
41
42sub new {
43 my ( $class, $status, $reason, $response ) = @_;
44
45 return $class->SUPER::new(
46 status => $status,
47 reason => $reason,
48 response => $response
49 );
50}
51
52=begin TML
53
54---++ ObjectMethod stringify() -> $string
55
56Generate a summary string. This is mainly for debugging.
57
58=cut
59
60sub stringify {
61 my $this = shift;
62 return
63qq(EngineException: Status code "$this->{status}" defined because of "$this->{reason}".);
64}
65
6613µs1;
67__END__