Skip to content

Commit

Permalink
src/cython/vapoursynth.pyx: include Python traceback in map errors
Browse files Browse the repository at this point in the history
Signed-off-by: akarin <[email protected]>
  • Loading branch information
AkarinVS committed Mar 5, 2023
1 parent 7a93bdf commit 097530b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cython/vapoursynth.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ cdef void __stdcall publicFilterFunction(const VSMap *inm, VSMap *outm, void *us
ret = {'clip':ret}
dictToMap(ret, outm, core, _vsapi)
except BaseException, e:
emsg = str(e).encode('utf-8')
emsg = (str(e) + '\n\n' + traceback.format_exc()).encode('utf-8')
_vsapi.mapSetError(outm, emsg)

cdef Plugin createPlugin(VSPlugin *plugin, const VSAPI *funcs, Core core):
Expand Down Expand Up @@ -2826,7 +2826,7 @@ cdef void __stdcall publicFunction(const VSMap *inm, VSMap *outm, void *userData
ret = {'val':ret}
dictToMap(ret, outm, core, vsapi)
except BaseException, e:
emsg = str(e).encode('utf-8')
emsg = (str(e) + '\n\n' + traceback.format_exc()).encode('utf-8')
vsapi.mapSetError(outm, emsg)


Expand Down
2 changes: 1 addition & 1 deletion test/async_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_raw_cb_fail(self):
self.assertEqual(self.cb_node, self.fail_filter)
self.assertEqual(self.cb_n, 0)
self.assertIsInstance(self.cb_result, vs.Error)
self.assertEqual(str(self.cb_result), "Fail")
self.assertEqual(str(self.cb_result)[:6], "Fail\n\n")

def test_raw_cb_fut_slow(self):
fut = Future()
Expand Down

0 comments on commit 097530b

Please sign in to comment.