Ticket #153 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

throw PicklingError if dill fails

Reported by: mmckerns Owned by: mmckerns
Priority: major Milestone: pathos-0.3a
Component: dill Keywords:
Cc:

Description (last modified by mmckerns) (diff)

throw PicklingError if dill fails

Change History

comment:1 Changed 3 years ago by mmckerns

could combine with ticket #132

comment:2 Changed 3 years ago by mmckerns

  • Description modified (diff)

dill throws a few kinds of errors... each for a different reason, so it'd be good to not lose that information.

Maybe a better approach is to have PicklingError a base class, and then the different types of errors that dill throws can correspond to derived classes. For example, an AttibuteError is thrown when the serialization works, but the unpickling doesn't (commonly from a missing bit of information left behind in __main__). An AttributeError could throw something like a PickleLoadError, while an AssertionError (thrown by failed attempt to write certain types to pickle's registry) could throw something like a PickleDumpError. Since they'd both derive from the base class, you could have an application try/except for PicklingErrors, and you'd catch any of dill's exceptions.

comment:3 Changed 3 years ago by mmckerns

  • Milestone changed from pathos-0.2a to pathos-0.3a
Note: See TracTickets for help on using tickets.