qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [04/30] qpid-proton git commit: PROTON-1366: Raise exception when wrapped object creation fails
Date Tue, 03 Jan 2017 22:02:36 GMT
PROTON-1366: Raise exception when wrapped object creation fails


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d39730bd
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d39730bd
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d39730bd

Branch: refs/heads/go1
Commit: d39730bd4494e1a727ffbfa2c2169c384ae83bb5
Parents: 9adbca2
Author: Chuck Rolke <crolke@redhat.com>
Authored: Thu Dec 1 15:23:09 2016 -0500
Committer: Chuck Rolke <crolke@redhat.com>
Committed: Thu Dec 1 15:23:09 2016 -0500

----------------------------------------------------------------------
 proton-c/bindings/python/proton/wrapper.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d39730bd/proton-c/bindings/python/proton/wrapper.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/wrapper.py b/proton-c/bindings/python/proton/wrapper.py
index 4bfe2b3..eff917b 100644
--- a/proton-c/bindings/python/proton/wrapper.py
+++ b/proton-c/bindings/python/proton/wrapper.py
@@ -38,6 +38,9 @@ class Wrapper(object):
         if callable(impl_or_constructor):
             # we are constructing a new object
             impl = impl_or_constructor()
+            if impl is None:
+                from proton import ProtonException
+                raise ProtonException("Wrapper failed to create wrapped object. Check for
file descriptor or memory exhaustion.")
             init = True
         else:
             # we are wrapping an existing object


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


Mime
View raw message