Skip to content

Commit

Permalink
Merge f269c43 into ed84528
Browse files Browse the repository at this point in the history
  • Loading branch information
ylavoie committed Jul 4, 2018
2 parents ed84528 + f269c43 commit bb83845
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Selenium/Remote/Driver.pm
Expand Up @@ -780,6 +780,9 @@ sub DEMOLISH {

# We install an 'around' because we can catch more exceptions this way
# than simply wrapping the explicit croaks in _execute_command.
# @args should be fed to the handler to provide context
# return_value could be assigned from the handler if we want to allow the
# error_handler to handle the errors

around '_execute_command' => sub {
my $orig = shift;
Expand All @@ -792,7 +795,7 @@ around '_execute_command' => sub {
}
catch {
if ($self->has_error_handler) {
$self->error_handler->($self,$_);
return $self->error_handler->($self,$_,@args);
}
else {
croak $_;
Expand Down

0 comments on commit bb83845

Please sign in to comment.