Ticket #4: foolscap-copiedremoteexception.patch
| File foolscap-copiedremoteexception.patch, 1.2 kB (added by strank, 3 years ago) |
|---|
-
a/foolscap/call.py
old new 766 766 state['parents'] = obj.parents 767 767 return state 768 768 769 770 class CopiedRemoteException(Exception): 771 """I represent an exception thrown on the remote end 772 (real Exception, old-style instance, or string), 773 I am a base class for locally reconstructed Exceptions. 774 You can catch me in a try block if you want. 775 """ 776 769 777 class CopiedFailure(failure.Failure, copyable.RemoteCopyOldStyle): 770 778 # this is a RemoteCopyOldStyle because you can't raise new-style 771 779 # instances as exceptions. … … 821 829 822 830 assert isinstance(self.type, str) 823 831 typepieces = self.type.split(".") 824 class ExceptionLikeString :832 class ExceptionLikeString(CopiedRemoteException): 825 833 pass 826 834 self.type = ExceptionLikeString 827 835 self.type.__module__ = ".".join(typepieces[:-1])
