Make exceptions picklable