Skip to content

Commit

Permalink
ooh..
Browse files Browse the repository at this point in the history
  • Loading branch information
realratchet committed Mar 27, 2024
1 parent ec8ec74 commit 144dd6e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mplite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,28 +313,25 @@ def stop(self):


def pickle_exception(e: Exception):
print(e)
if e.__traceback__ is not None:
tback = pklex.pickle_traceback(e.__traceback__)
e.__traceback__ = None
else:
tback = None

pkld = pklex.pickle_exception(e)
print(pkld)
fn_ex, (ex_cls, ex_txt, ex_rsn, _) = pkld
fn_ex, (ex_cls, ex_txt, ex_rsn, _, *others) = pklex.pickle_exception(e)

return fn_ex, (ex_cls, ex_txt, ex_rsn, tback)
return fn_ex, (ex_cls, ex_txt, ex_rsn, tback, *others)


def unpickle_exception(e):
fn_ex, (ex_cls, ex_txt, ex_rsn, tback) = e
fn_ex, (ex_cls, ex_txt, ex_rsn, tback, *others) = e

if tback is not None:
fn_tback, args_tback = tback
tback = fn_tback(*args_tback)

return fn_ex(ex_cls, ex_txt, ex_rsn, tback)
return fn_ex(ex_cls, ex_txt, ex_rsn, tback, *others)


def _do_task_exception_mode(task: Task):
Expand Down

0 comments on commit 144dd6e

Please sign in to comment.