|
Exceptions.pm: msg#00237web.mason.user
Our shop currently adds a function (as_email_text) to the Exceptions.pm, to get similar output as the as_html as plain old text. This makes the email error message for our simple mailtools easy reading.. sub as_email_text { my ($self) = @_; my $out; my $interp = HTML::Mason::Interp->new(out_method => \$out); my $comp = $interp->make_component(comp_source => <<'EOF'); <%args> $msg $info $error </%args> % foreach my $entry (@{$info->{context}}) { % my ($line_num, $line, $highlight) = @$entry; % $line = '' unless defined $line; <% $highlight ? "---->" : "" %><% $line %> % } EOF $interp->exec($comp, msg => $self->full_message, info => $self->analyze_error, error => $self); return $out; } ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: How-to clone a whole project ?: 00237, Ken Williams |
|---|---|
| Next by Date: | Re: DHandlers and Apache: 00237, Jonathan Swartz |
| Previous by Thread: | Re: Internal_redirect, clear_buffer, etc ... not saving session vars?i: 00237, Dave Rolsky |
| Next by Thread: | Re: Zillions of components - what is calling what?: 00237, Dominic Mitchell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |