search for: pyerr_fetch

Displaying 5 results from an estimated 5 matches for "pyerr_fetch".

Did you mean: _pyerr_fetch
2018 Apr 05
1
Re: [PATCH nbdkit] python: Turn python exceptions into nbdkit errors properly.
..., *error_str; > + char *error_cstr; > + > + /* Convert the Python exception to a string. > + * https://stackoverflow.com/a/1418703 > + * But forget about the traceback, it's very hard to print. > + * https://stackoverflow.com/q/1796510 > + */ > + PyErr_Fetch (&type, &error, &traceback); > + PyErr_NormalizeException (&type, &error, &traceback); > + error_str = PyObject_Str (error); > + error_cstr = python_to_string (error_str); > + nbdkit_error ("%s: %s: error: %s", > + script...
2018 Apr 05
4
[PATCH nbdkit] python: Turn python exceptions into nbdkit errors
Much more annoying that it needs to be, but I have tested it and it works on Python 2 & 3. Note this will not work on Python 3.0 - 3.2, but I guess we don't care about those versions. Rich.
2018 Aug 08
2
[PATCH nbdkit] python: Try harder to print the full traceback on error.
...*error_str; - char *error_cstr; + PyObject *type, *error, *traceback; - /* Convert the Python exception to a string. - * https://stackoverflow.com/a/1418703 - * But forget about the traceback, it's very hard to print. - * https://stackoverflow.com/q/1796510 - */ PyErr_Fetch (&type, &error, &traceback); PyErr_NormalizeException (&type, &error, &traceback); - error_str = PyObject_Str (error); - error_cstr = python_to_string (error_str); - nbdkit_error ("%s: %s: error: %s", - script, callback, -...
2018 Aug 08
0
Re: [PATCH nbdkit] python: Try harder to print the full traceback on error.
...t; + PyObject *type, *error, *traceback; > > - /* Convert the Python exception to a string. > - * https://stackoverflow.com/a/1418703 > - * But forget about the traceback, it's very hard to print. > - * https://stackoverflow.com/q/1796510 > - */ > PyErr_Fetch (&type, &error, &traceback); > PyErr_NormalizeException (&type, &error, &traceback); > - error_str = PyObject_Str (error); > - error_cstr = python_to_string (error_str); > - nbdkit_error ("%s: %s: error: %s", > - script...
2018 Apr 05
0
[PATCH nbdkit] python: Turn python exceptions into nbdkit errors properly.
...+ PyObject *type, *error, *traceback, *error_str; + char *error_cstr; + + /* Convert the Python exception to a string. + * https://stackoverflow.com/a/1418703 + * But forget about the traceback, it's very hard to print. + * https://stackoverflow.com/q/1796510 + */ + PyErr_Fetch (&type, &error, &traceback); + PyErr_NormalizeException (&type, &error, &traceback); + error_str = PyObject_Str (error); + error_cstr = python_to_string (error_str); + nbdkit_error ("%s: %s: error: %s", + script, callback, error_cstr ?...