qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Tang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-6251) socket.error raised in writeable is not transformed to 'ConnectionError' which will cause be omitted in upper layer
Date Mon, 01 Dec 2014 05:18:12 GMT

     [ https://issues.apache.org/jira/browse/QPID-6251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yi Tang updated QPID-6251:
--------------------------
    Description: 
when calling {{writeable}}, the exception {{socket.error}} is not transformed to {{ConnectionError}}
which will be omitted in upper layer

the follow patch should fix it:
{code}
Index: qpid/messaging/driver.py
===================================================================
--- qpid/messaging/driver.py    (revision 1642638)
+++ qpid/messaging/driver.py    (working copy)
@@ -474,7 +474,7 @@
       sent = self.engine.read(n)
       rawlog.debug("SENT[%s]: %r", self.log_id, sent)
     except socket.error, e:
-      self.close_engine(e)
+      self.close_engine(ConnectionError(text=str(e)))
       notify = True
 
     if self.update_status() or notify:
{code}


  was:
when calling {{writeable}}, the exception {{socket.error}} is not transformed to {{ConnectionError}}
which will cause catch omitted in upper layer

the follow patch should fix it:
{code}
Index: qpid/messaging/driver.py
===================================================================
--- qpid/messaging/driver.py    (revision 1642638)
+++ qpid/messaging/driver.py    (working copy)
@@ -474,7 +474,7 @@
       sent = self.engine.read(n)
       rawlog.debug("SENT[%s]: %r", self.log_id, sent)
     except socket.error, e:
-      self.close_engine(e)
+      self.close_engine(ConnectionError(text=str(e)))
       notify = True
 
     if self.update_status() or notify:
{code}


        Summary: socket.error raised in writeable is not transformed to 'ConnectionError'
which will cause be omitted  in upper layer  (was: socket.error raised in writeable is not
transformed to 'ConnectionError' which will cause catch omitted  in upper layer)

> socket.error raised in writeable is not transformed to 'ConnectionError' which will cause
be omitted  in upper layer
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6251
>                 URL: https://issues.apache.org/jira/browse/QPID-6251
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: 0.26, 0.28, 0.30
>            Reporter: Yi Tang
>
> when calling {{writeable}}, the exception {{socket.error}} is not transformed to {{ConnectionError}}
which will be omitted in upper layer
> the follow patch should fix it:
> {code}
> Index: qpid/messaging/driver.py
> ===================================================================
> --- qpid/messaging/driver.py    (revision 1642638)
> +++ qpid/messaging/driver.py    (working copy)
> @@ -474,7 +474,7 @@
>        sent = self.engine.read(n)
>        rawlog.debug("SENT[%s]: %r", self.log_id, sent)
>      except socket.error, e:
> -      self.close_engine(e)
> +      self.close_engine(ConnectionError(text=str(e)))
>        notify = True
>  
>      if self.update_status() or notify:
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message