search for: format_exception_fn

Displaying 2 results from an estimated 2 matches for "format_exception_fn".

2018 Aug 08
2
[PATCH nbdkit] python: Try harder to print the full traceback on error.
...rt the Python traceback to a string and call nbdkit_error. + * https://stackoverflow.com/a/15907460/7126113 + */ +static int +print_python_traceback (const char *callback, + PyObject *type, PyObject *error, PyObject *traceback) +{ + PyObject *module_name, *traceback_module, *format_exception_fn, *rv, + *traceback_str; + char *traceback_cstr; + +#ifdef HAVE_PYSTRING_FROMSTRING + module_name = PyString_FromString ("traceback"); +#else + module_name = PyUnicode_FromString ("traceback"); +#endif + traceback_module = PyImport_Import (module_name); + Py_DECREF (modul...
2018 Aug 08
0
Re: [PATCH nbdkit] python: Try harder to print the full traceback on error.
...call nbdkit_error. > + * https://stackoverflow.com/a/15907460/7126113 > + */ > +static int > +print_python_traceback (const char *callback, > + PyObject *type, PyObject *error, PyObject > *traceback) > +{ > + PyObject *module_name, *traceback_module, *format_exception_fn, *rv, > + *traceback_str; > + char *traceback_cstr; > + > +#ifdef HAVE_PYSTRING_FROMSTRING > + module_name = PyString_FromString ("traceback"); > +#else > + module_name = PyUnicode_FromString ("traceback"); > +#endif > + traceback_module = PyImp...