public function returnExceptionToThrow($status_code)
    {
        static $map = array (
            1  => 'E4xx_IndexOutOfBoundsWebDriverError',
            2  => 'E4xx_NoCollectionWebDriverError',
            3  => 'E4xx_NoStringWebDriverError',
            4  => 'E4xx_NoStringLengthWebDriverError',
            5  => 'E4xx_NoStringWrapperWebDriverError',
            6  => 'E4xx_NoSuchDriverWebDriverError',
            7  => 'E4xx_NoSuchElementWebDriverError',
            8  => 'E4xx_NoSuchFrameWebDriverError',
            9  => 'E5xx_UnknownCommandWebDriverError',
            10 => 'E4xx_ObsoleteElementWebDriverError',
            11 => 'E4xx_ElementNotDisplayedWebDriverError',
            12 => 'E5xx_InvalidElementStateWebDriverError',
            13 => 'E5xx_UnhandledWebDriverError',
            14 => 'E4xx_ExpectedWebDriverError',
            15 => 'E4xx_ElementNotSelectableWebDriverError',
            16 => 'E4xx_NoSuchDocumentWebDriverError',
            17 => 'E5xx_UnexpectedJavascriptWebDriverError',
            18 => 'E4xx_NoScriptResultWebDriverError',
            19 => 'E4xx_XPathLookupWebDriverError',
            20 => 'E4xx_NoSuchCollectionWebDriverError',
            21 => 'E4xx_TimeOutWebDriverError',
            22 => 'E5xx_NullPointerWebDriverError',
            23 => 'E4xx_NoSuchWindowWebDriverError',
            24 => 'E4xx_InvalidCookieDomainWebDriverError',
            25 => 'E4xx_UnableToSetCookieWebDriverError',
            26 => 'E4xx_UnexpectedAlertOpenWebDriverError',
            27 => 'E4xx_NoAlertOpenWebDriverError',
            28 => 'E4xx_ScriptTimeoutWebDriverError',
            29 => 'E4xx_InvalidElementCoordinatesWebDriverError',
            30 => 'E4xx_IMENotAvailableWebDriverError',
            31 => 'E5xx_IMEEngineActivationFailedWebDriverError',
            32 => 'E4xx_InvalidSelectorWebDriverError',
            33 => 'E5xx_SessionNotCreatedWebDriverError',
            34 => 'E4xx_MoveTargetOutOfBoundsWebDriverError',
        );

        // did an error occur?
        if ($status_code == 0) {
            return null;
        }

        // is this a known problem?
        if (isset($map[$status_code])) {
            return __NAMESPACE__ . '\\' . $map[$status_code];
        }

        // we have an unknown exception
        return __NAMESPACE__ . '\\UnknownWebDriverError';
    }