← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:43 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/EngineException.pm
StatementsExecuted 8 statements in 323µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11135µs42µsFoswiki::EngineException::::BEGIN@16Foswiki::EngineException::BEGIN@16
11117µs34µsFoswiki::EngineException::::BEGIN@17Foswiki::EngineException::BEGIN@17
1119µs9µ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
16247µs250µs
# spent 42µs (35+7) within Foswiki::EngineException::BEGIN@16 which was called: # once (35µs+7µs) by Foswiki::UI::BEGIN@157 at line 16
use strict;
# spent 42µs making 1 call to Foswiki::EngineException::BEGIN@16 # spent 8µs making 1 call to strict::import
17244µs252µs
# spent 34µs (17+18) within Foswiki::EngineException::BEGIN@17 which was called: # once (17µs+18µs) by Foswiki::UI::BEGIN@157 at line 17
use warnings;
# spent 34µs making 1 call to Foswiki::EngineException::BEGIN@17 # spent 18µs making 1 call to warnings::import
18
192215µs19µs
# spent 9µs within Foswiki::EngineException::BEGIN@19 which was called: # once (9µs+0s) by Foswiki::UI::BEGIN@157 at line 19
use Error ();
# spent 9µs making 1 call to Foswiki::EngineException::BEGIN@19
20111µ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
5917µs1;
60__END__