Skip to main content

get_pickleable_exception

Make sure exception is pickleable.

def get_pickleable_exception(
exc: Exception
) - > Exception

Make sure exception is pickleable.

Parameters

NameTypeDescription
excExceptionThe exception instance to be validated or converted for pickling compatibility.

Returns

TypeDescription
ExceptionThe original exception if pickleable, the nearest pickleable parent exception, or an UnpickleableExceptionWrapper as a fallback.