Ver código fonte

Merge pull request #187 from gempesaw/helpful-exceptions

Add name of command to exceptions when possible
Daniel Gempesaw 10 anos atrás
pai
commit
da8764e36e
1 arquivos alterados com 2 adições e 0 exclusões
  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}"