Skip to content

Commit

Permalink
slightly better exception handling for Mojo::Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 17, 2013
1 parent 2e0dd08 commit 2eaf19c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/Exception.pm
Expand Up @@ -100,8 +100,7 @@ sub _detect {

# Search for context in files
for my $frame (@trace) {
next unless -r $frame->[0];
open my $handle, '<:utf8', $frame->[0];
next unless -r $frame->[0] && open my $handle, '<:utf8', $frame->[0];
$self->_context($frame->[1], [[<$handle>]]);
return $self;
}
Expand Down

0 comments on commit 2eaf19c

Please sign in to comment.