Making exceptions pickleable