Repository: qpid-proton
Updated Branches:
  refs/heads/master 9adbca281 -> d39730bd4


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/master
Commit: d39730bd4494e1a727ffbfa2c2169c384ae83bb5
Parents: 9adbca2
Author: Chuck Rolke <cro...@redhat.com>
Authored: Thu Dec 1 15:23:09 2016 -0500
Committer: Chuck Rolke <cro...@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-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to