module documentation
Asynchronous-friendly error mechanism.
See Failure
.
Exception |
|
Undocumented |
Exception |
|
A basic abstraction for an error that has occurred. |
Exception |
|
Raised when trying to create a Failure from the current interpreter exception state and there is no current exception state. |
Function | format |
Format and write frames. |
Function | start |
Enable debug hooks for Failures. |
Constant | DO |
Undocumented |
Constant | EXCEPTION |
Undocumented |
Variable | count |
Undocumented |
Variable | traceup |
Undocumented |
Class | _ |
A fake code object, used by _Traceback via _Frame . |
Class | _ |
A fake frame object, used by _Traceback . |
Class | _ |
Fake traceback object which can be passed to functions in the standard library traceback module. |
Function | _debuginit |
Initialize failure object, possibly spawning pdb. |
Function | _extraneous |
Mark the given callable as extraneous to inlineCallbacks exception reporting; don't show these functions. |
Function | _safe |
Convert a list of (name, object) pairs into (name, repr) pairs. |
Function | _ |
Construct a fake traceback object using a list of frames. |
Type Variable | _ |
Undocumented |
Variable | _inline |
Undocumented |
Format and write frames.
Parameters | |
frames:list | is a list of frames as used by Failure.frames, with each frame being a list of (funcName, fileName, lineNumber, locals.items(), globals.items()) |
write:callable | this will be called with formatted strings. |
detail:string | Four detail levels are available: default, brief, verbose, and verbose-vars-not-captured. Failure.printDetailedTraceback uses the latter when the caller asks for verbose, but no vars were captured, so that an explicit warning about the missing data is shown. |
def _debuginit(self, exc_value=None, exc_type=None, exc_tb=None, captureVars=False, Failure__init__=Failure.__init__):
(source)
¶
Initialize failure object, possibly spawning pdb.
Mark the given callable as extraneous to inlineCallbacks exception reporting; don't show these functions.
Parameters | |
f:function | a function that you NEVER WANT TO SEE AGAIN in ANY TRACEBACK reported by Failure. |
Returns | |
_T_Callable | f |
Convert a list of (name, object) pairs into (name, repr) pairs.
twisted.python.reflect.safe_repr
is used to generate the repr, so no exceptions will be raised by faulty __repr__ methods.
Parameters | |
vars | a sequence of (name, value) pairs as returned by e.g. locals().items(). |
Returns | |
a sequence of (name, repr) pairs. |