class MyException(Exception):

    def __init__(self, arg1, arg2):
        super(MyException, self).__init__(arg1, arg2)
self.arg1 = arg1
self.arg2 = arg2
How to make a custom exception class with multiple init args pickleable