@classmethod<EOL><INDENT>def dump(cls, type, exc):<DEDENT>
try:<EOL><INDENT>return pickle.dumps(type), pickle.dumps(exc)<EOL><DEDENT>except Exception:<EOL><INDENT>return cls.dump(cls, cls(repr(exc)))<EOL><DEDENT>
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.