Skip to content

Commit

Permalink
Backported error handling patch.
Browse files Browse the repository at this point in the history
Thanks to autarch for reporting the bug. Will backport.
  • Loading branch information
theory committed Apr 5, 2010
1 parent 68bf524 commit c383e09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/Bric/App/AccessHandler.pm
Expand Up @@ -291,10 +291,8 @@ B<Notes:> NONE.
sub handle_err {
my ($r, $err) = @_;
# Set the filename for the error element.
my $uri = $r->uri;
(my $fn = $r->filename) =~ s/$uri/${\ERROR_URI}/;
$r->uri(ERROR_URI);
$r->filename($fn);
$r->filename(Bric::App::Handler::ERROR_FILE);

$err = Bric::Util::Fault::Exception::AP->new(
error => 'Error executing AccessHandler',
Expand Down
9 changes: 1 addition & 8 deletions lib/Bric/App/PreviewHandler.pm
Expand Up @@ -58,13 +58,6 @@ use Apache::Log;
# Function and Closure Prototypes
################################################################################

################################################################################
# Constants
################################################################################
use constant ERROR_FILE =>
Bric::Util::Trans::FS->cat_dir(MASON_COMP_ROOT->[0][1],
Bric::Util::Trans::FS->split_uri(ERROR_URI));

################################################################################
# Fields
################################################################################
Expand Down Expand Up @@ -207,7 +200,7 @@ sub handle_err {
my ($r, $err) = @_;

$r->uri(ERROR_URI);
$r->filename(ERROR_FILE);
$r->filename(Bric::App::Handler::ERROR_FILE);

$err = Bric::Util::Fault::Exception::AP->new(
error => 'Error executing PreviewHandler',
Expand Down
10 changes: 10 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -110,6 +110,16 @@ The C<best_uri()> method of L<Bric::Util::Burner> now works when creating a
link to a story on a different site and the protocol for the output channel is
not set. It defaults to "http://" for the protocol. [David]

=item *

Fixed error handling in the access handler so that it works when a URI is a
directory. Thanks to Dave Rolsky for the initial patch. [David]

=item *

Updated session error handling to recognize new error message from
Apache::Session. [Dave Rolsky]

=back

=head1 VERSION 1.10.9 (2010-01-28)
Expand Down

0 comments on commit c383e09

Please sign in to comment.