Skip to content

Instantly share code, notes, and snippets.

@sbacelic
Created May 30, 2013 15:10
Show Gist options
  • Save sbacelic/5678610 to your computer and use it in GitHub Desktop.
Save sbacelic/5678610 to your computer and use it in GitHub Desktop.
object(Swift_IoException)[491]
protected 'message' => string 'Connection to localhost:25 Timed Out' (length=36)
private 'string' (Exception) => string '' (length=0)
protected 'code' => int 0
protected 'file' => string '/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php' (length=106)
protected 'line' => int 169
private 'trace' (Exception) =>
array (size=14)
0 =>
array (size=6)
'file' => string '/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php' (length=115)
'line' => int 400
'function' => string 'readLine' (length=8)
'class' => string 'Swift_Transport_StreamBuffer' (length=28)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
1 =>
array (size=6)
'file' => string '/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php' (length=115)
'line' => int 291
'function' => string '_getFullResponse' (length=16)
'class' => string 'Swift_Transport_AbstractSmtpTransport' (length=37)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
2 =>
array (size=6)
'file' => string '/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php' (length=115)
'line' => int 119
'function' => string '_readGreeting' (length=13)
'class' => string 'Swift_Transport_AbstractSmtpTransport' (length=37)
'type' => string '->' (length=2)
'args' =>
array (size=0)
...
3 =>
array (size=6)
'file' => string '/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php' (length=111)
'line' => int 56
'function' => string 'start' (length=5)
'class' => string 'Swift_Transport_AbstractSmtpTransport' (length=37)
'type' => string '->' (length=2)
'args' =>
array (size=0)
@sbacelic
Copy link
Author

    /** Get an entire multi-line response using its sequence number */
    protected function _getFullResponse($seq)
    {
        $response = '';
        try {
            do {
                $line = $this->_buffer->readLine($seq);
                $response .= $line;
            } while (null !== $line && false !== $line && ' ' != $line{3});
+        } catch (Swift_IoException $e) {
+            $this->_throwException(new Swift_TransportException($e->getMessage()));
        } catch (Swift_TransportException $e) {
            $this->_throwException($e);
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment