summaryrefslogtreecommitdiff
path: root/source4/scripting/swig
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-20 00:55:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:51 -0500
commit6d82eaa7e9597ebaf292e21e00345be0c50287bf (patch)
treef19d1672e086f9a5d237a9d419d9c2dff6506327 /source4/scripting/swig
parentcb3cacdf402d91722b67b494f36abac0280fc5b9 (diff)
downloadsamba-6d82eaa7e9597ebaf292e21e00345be0c50287bf.tar.gz
samba-6d82eaa7e9597ebaf292e21e00345be0c50287bf.tar.bz2
samba-6d82eaa7e9597ebaf292e21e00345be0c50287bf.zip
r2424: Refactor handling of non-OK NTSTATUS returns to be more swiggish.
(This used to be commit aaef6eaf6e0c38fb277d1be0617dfdff559a0115)
Diffstat (limited to 'source4/scripting/swig')
-rw-r--r--source4/scripting/swig/dcerpc.i10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index bded875b10..9677d4e62d 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -285,6 +285,16 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
const char *username,
const char *password);
+/* Run this test after each wrapped function */
+
+%exception {
+ $action
+ if (!NT_STATUS_IS_OK(result)) {
+ set_ntstatus_exception(NT_STATUS_V(result));
+ return NULL;
+ }
+}
+
%include "librpc/gen_ndr/misc.i"
%include "librpc/gen_ndr/lsa.i"
%include "librpc/gen_ndr/samr.i"