diff --git a/src/Behat/Mink/Exception/ExpectationException.php b/src/Behat/Mink/Exception/ExpectationException.php
index <HASH>..<HASH> 100644
--- a/src/Behat/Mink/Exception/ExpectationException.php
+++ b/src/Behat/Mink/Exception/ExpectationException.php
@@ -133,8 +133,10 @@ class ExpectationException extends Exception
         $driver = basename(str_replace('\\', '/', get_class($this->session->getDriver())));
 
         $info = '+--[ ';
-        if (!in_array($driver, array('SahiDriver', 'SeleniumDriver', 'Selenium2Driver'))) {
+        try {
             $info .= 'HTTP/1.1 '.$this->session->getStatusCode().' | ';
+        } catch (UnsupportedDriverActionException $e) {
+            // Ignore the status code when not supported
         }
         $info .= $this->session->getCurrentUrl().' | '.$driver." ]\n|\n";
Changed the handling of drivers not supporting status code

This avoids hardcoding the list of excluded drivers in the
ExpectationException but relying on the UnsupportedDriverActionException
instead.