Displaying 2 results from an estimated 2 matches for "0b03054".
Did you mean:
0.0054
2019 Jun 28
0
[PATCH libnbd v2] python: Raise a custom exception containing error string and errno.
...port endpoint is not connected', 107)
---
generator/generator | 34 +++++++++++++++++++++++++++++++++-
python/t/610-exception.py | 33 +++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/generator/generator b/generator/generator
index 157a9cb..0b03054 100755
--- a/generator/generator
+++ b/generator/generator
@@ -3337,6 +3337,19 @@ get_handle (PyObject *obj)
return (struct nbd_handle *) PyCapsule_GetPointer(obj, \"nbd_handle\");
}
+/* nbd.Error exception. */
+extern PyObject *nbd_internal_py_Error;
+
+static inline void
+raise_ex...
2019 Jun 28
3
[PATCH libnbd v2] python: Raise a custom exception containing error string and errno.
This kind of fixes the problems in v1. The exception still primarily
lives in the libnbdmod and you could still refer to it using
libnbdmod.Error (but don't do that). However when the exception is
printed it now appears as nbd.Error, and you can catch it also using
the same name.
Other problems:
- There is no "nice" interface to accessing the exception fields.
You have to use