228 |
eval { |
eval { |
229 |
$body = $self->$run; |
$body = $self->$run; |
230 |
}; |
}; |
231 |
$body |
$body = $self->error( $@, '' ) if $@; |
|
= $self->error( $@ ) |
|
|
. $self->dropdown( self => $self ) |
|
|
if $@; |
|
232 |
} |
} |
233 |
if ( $self->content_type !~ m{html} ) { |
if ( $self->content_type !~ m{html} ) { |
234 |
warn "# return only $self body ", $self->content_type; |
warn "# return only $self body ", $self->content_type; |
321 |
$error =~ s{at\s+(\S+)\s+line\s+(\d+)} |
$error =~ s{at\s+(\S+)\s+line\s+(\d+)} |
322 |
{at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm; |
{at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm; |
323 |
|
|
324 |
# our backtrace |
$error =~ s{(via (?:package)\s+"?)([\w:]+)("?)} |
325 |
$error =~ s{(via (?:package) "?)([\w:]+)("?)} |
{$1<a target="$2" href="/$2">$2</a>$3}gsm; |
|
{$1<a target="editor" href="/editor+$2+1">$2</a>$3}gsm; |
|
326 |
|
|
327 |
# method error messages |
# method error messages |
328 |
# $error =~ s{(method ")(\w+)"} |
# $error =~ s{(method ")(\w+)"} |
329 |
# {$1<a target="/Frey::Shell::Grep?pattern=$2">$2</a>"}gsm; # FIXME replace with link to Frey::Introspect data |
# {$1<a target="/Frey::Shell::Grep?pattern=$2">$2</a>"}gsm; # FIXME replace with link to Frey::Introspect data |
330 |
|
|
331 |
# anything that looks like Class::Name= |
# anything that looks like "Class::Name" |
332 |
$error =~ s{(\w+(?:::\w+)+)=} |
$error =~ s{"(\w+(?:::\w+)+)"} |
333 |
{<a target="$1" href="/$1">$1</a>=}gsm; |
{"<a target="$1" href="/$1">$1</a>"}gsm; |
334 |
|
|
335 |
return $error; |
return $error; |
336 |
} |
} |
629 |
) = caller($_) or last; |
) = caller($_) or last; |
630 |
|
|
631 |
push @backtrace, |
push @backtrace, |
632 |
qq|via $package at $path line $line|; |
qq|via "$package" at $path line $line|; |
633 |
} |
} |
634 |
#warn "# backtrace: ", dump( @backtrace ) if @backtrace; |
#warn "# backtrace: ", dump( @backtrace ) if @backtrace; |
635 |
return @backtrace; |
return @backtrace; |