% # Check to see if this is a preview screen. % my $prev = $r->notes('burner.preview'); <& /widgets/wrappers/sharky/header.mc, title => 'Error', useSideNav => !$prev, no_toolbar => !$prev, context => 'An error occurred.', debug => QA_MODE || TEMPLATE_QA_MODE &>
<% $lang->maketext('An error occurred while processing your request:')%>
% if (isa_exception($fault)) {<% escape_html($fault->error) %>
% } % if (isa_bric_exception($fault) and my $pay = $fault->payload) {<% escape_html($pay) %>% } % if (QA_MODE or (TEMPLATE_QA_MODE and $is_burner_error)) {
Stack:
<% HTML::Mason::Exceptions::isa_mason_exception($fault) ? $fault->as_text : $fault->trace->as_string %>% if (QA_MODE) {
Request args:
Location of the error:
<% shift(@elements)->get_name %> -> <% join(' -> ', map { $_->get_name . '[' . ($_->get_place + 1) . ']' } @elements) %>
Please report this error to your administrator.
% } <& '/widgets/wrappers/sharky/footer.mc' &> % $r->status(Apache::Constants::HTTP_INTERNAL_SERVER_ERROR); % $m->abort; <%init>; # Clear out messages - they're likely irrelevant now. clear_msg(); # exception object ($fault) and $more_args are now always # in pnotes, not passed in %args my $fault = $r->pnotes('BRIC_EXCEPTION'); warn "'$fault' not an exception object" unless isa_exception($fault); my $more_err = $r->pnotes('BRIC_MORE_ERR'); my $pay = isa_bric_exception($fault) ? ($fault->payload || '') : ''; my $is_burner_error = isa_bric_exception($fault, 'Exception::Burner'); my %req_args = HTML::Mason::Request->instance->request_args; %init>