Skip to content

Exception not getting caught #6

@sharique

Description

@sharique

I'm using following code to call inside drupal custom module

try {
      $response = $this->soap->__soapCall('MyMethod', [
        $param,
      ]);
    }
    catch (Exception $e) {
      $resp = new RedirectResponse(\Drupal::url('mymodule.error_page'));
      $resp->send();
    }

I get white page with error, it does not redirect to error page.

The website encountered an unexpected error. Please try again later.

RuntimeException: Curl error: Failed to connect to xx.xx.xx.xx port 80: Timed out in jamesiarmes\PhpNtlm\SoapClient->__doRequest() (line 91 of C:\Sites\site1\vendor\jamesiarmes\php-ntlm\src\SoapClient.php).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions