Selaa lähdekoodia

Add name of command to exception when possible

Daniel Gempesaw 11 vuotta sitten
vanhempi
sitoutus
7f6fd606e3
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      lib/Selenium/Remote/Driver.pm

+ 2 - 0
lib/Selenium/Remote/Driver.pm

@@ -497,6 +497,8 @@ sub _execute_command {
                 }
                 elsif ( $resp->{cmd_return} ) {
                     if ( ref( $resp->{cmd_return} ) eq 'HASH' ) {
+                        $msg .= ": $res->{command}"
+                          if $res->{command};
                         $msg .= ": $resp->{cmd_return}->{error}->{msg}"
                           if $resp->{cmd_return}->{error}->{msg};
                         $msg .= ": $resp->{cmd_return}->{message}"