← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:09 2015

Filename/var/www/foswiki11/lib/Foswiki/EngineException.pm
StatementsExecuted 8 statements in 167µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs25µsFoswiki::EngineException::::BEGIN@16Foswiki::EngineException::BEGIN@16
1118µs14µsFoswiki::EngineException::::BEGIN@17Foswiki::EngineException::BEGIN@17
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
16225µs238µs
# spent 25µs (12+13) within Foswiki::EngineException::BEGIN@16 which was called: # once (12µs+13µs) by Foswiki::UI::BEGIN@157 at line 16
use strict;
# spent 25µs making 1 call to Foswiki::EngineException::BEGIN@16 # spent 13µs making 1 call to strict::import
17221µs219µs
# spent 14µs (8+5) within Foswiki::EngineException::BEGIN@17 which was called: # once (8µs+5µs) by Foswiki::UI::BEGIN@157 at line 17
use warnings;
# spent 14µs making 1 call to Foswiki::EngineException::BEGIN@17 # spent 5µs making 1 call to warnings::import
18
192110µs13µs
# spent 3µs within Foswiki::EngineException::BEGIN@19 which was called: # once (3µs+0s) by Foswiki::UI::BEGIN@157 at line 19
use Error ();
# spent 3µs making 1 call to Foswiki::EngineException::BEGIN@19
2017µsour @ISA = ('Error');
21
22=begin TML
23
24---+ ClassMethod new( $status, $reason [, $response] )
25
26 * =$status= - status code to send to client
27 * =$reason= - string reason for failure
28 * =$response= - custom Foswiki::Response object to be sent to client. Optional.
29
30All the above fields are accessible from the object in a catch clause
31in the usual way e.g. =$e->{status}= and =$e->{reason}=
32
33=cut
34
35sub new {
36 my ( $class, $status, $reason, $response ) = @_;
37
38 return $class->SUPER::new(
39 status => $status,
40 reason => $reason,
41 response => $response
42 );
43}
44
45=begin TML
46
47---++ ObjectMethod stringify() -> $string
48
49Generate a summary string. This is mainly for debugging.
50
51=cut
52
53sub stringify {
54 my $this = shift;
55 return
56qq(EngineException: Status code "$this->{status}" defined because of "$this->{reason}".);
57}
58
5913µs1;
60__END__