Package foolscap :: Module call :: Class CopiedFailure
[hide private]
[frames] | no frames]

Class CopiedFailure

source code

twisted.python.failure.Failure --+
                                 |
  copyable._RemoteCopyBase --+   |
                             |   |
   copyable.RemoteCopyOldStyle --+
                                 |
                                CopiedFailure

I am a shadow of some remote Failure instance. I contain less information than the original did.

You can still extract a (brief) printable traceback from me. My .parents attribute is a list of strings describing the class of the exception that I contain, just like the real Failure had, so my trap() and check() methods work fine. My .type and .value attributes are string representations of the original exception class and exception instance, respectively. The most significant effect is that you cannot access f.value.args, and should instead just use f.value .

My .frames and .stack attributes are empty, although this may change in the future (and with the cooperation of the sender).

Instance Methods [hide private]
 
__init__(self)
Initialize me with an explanation of the error.
source code
 
__getstate__(self)
Avoid pickling objects in the traceback.
source code
 
__setstate__(self, state) source code
 
setCopyableState(self, state) source code
 
__str__(self) source code
 
printTraceback(self, file=None, elideFrameworkCode=0, detail='default')
Emulate Python's standard error reporting mechanism.
source code

Inherited from twisted.python.failure.Failure: __providedBy__, __repr__, check, cleanFailure, getBriefTraceback, getErrorMessage, getTraceback, getTracebackObject, printBriefTraceback, printDetailedTraceback, raiseException, throwExceptionIntoGenerator, trap

Class Methods [hide private]

Inherited from twisted.python.failure.Failure (private): _findFailure

Class Variables [hide private]
  nonCyclic = True
  stateSchema = FailureConstraint()
  pickled = 1
  __implemented__ = <implementedBy foolscap.call.CopiedFailure>
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from twisted.python.failure.Failure: stack

Inherited from twisted.python.failure.Failure (private): _yieldOpcode

Inherited from copyable.RemoteCopyOldStyle: copytype

Instance Variables [hide private]

Inherited from twisted.python.failure.Failure: type, value

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialize me with an explanation of the error.

By default, this will use the current exception (sys.exc_info()). However, if you want to specify a particular kind of failure, you can pass an exception as an argument.

If no exc_value is passed, then an "original" Failure will be searched for. If the current exception handler that this Failure is being constructed in is handling an exception raised by raiseException, then this Failure will act like the original Failure.

Overrides: copyable._RemoteCopyBase.__init__

__getstate__(self)

source code 

Avoid pickling objects in the traceback.

Overrides: twisted.python.failure.Failure.__getstate__
(inherited documentation)

setCopyableState(self, state)

source code 
Overrides: copyable._RemoteCopyBase.setCopyableState

__str__(self)
(Informal representation operator)

source code 
Overrides: twisted.python.failure.Failure.__str__

printTraceback(self, file=None, elideFrameworkCode=0, detail='default')

source code 

Emulate Python's standard error reporting mechanism.

Overrides: twisted.python.failure.Failure.printTraceback
(inherited documentation)

Class Variable Details [hide private]

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x871352c>