module documentation
(source)

Asynchronous-friendly error mechanism.

See Failure.

Variable count Undocumented
Variable traceupLength Undocumented
Class DefaultException Undocumented
Function format_frames Format and write frames.
Variable EXCEPTION_CAUGHT_HERE Undocumented
Class NoCurrentExceptionError Raised when trying to create a Failure from the current interpreter exception state and there is no current exception state.
Class Failure A basic abstraction for an error that has occurred.
Variable DO_POST_MORTEM Undocumented
Function startDebugMode Enable debug hooks for Failures.
Function _Traceback No summary
Class _TracebackFrame Fake traceback object which can be passed to functions in the standard library traceback module.
Class _Frame A fake frame object, used by _Traceback.
Class _Code A fake code object, used by _Traceback via _Frame.
Variable _inlineCallbacksExtraneous Undocumented
Function _extraneous Mark the given callable as extraneous to inlineCallbacks exception reporting; don't show these functions.
Function _safeReprVars Convert a list of (name, object) pairs into (name, repr) pairs.
Function _debuginit Initialize failure object, possibly spawning pdb.
count = (source)

Undocumented

(type: int)
traceupLength = (source)

Undocumented

(type: int)
def format_frames(frames, write, detail='default'): (source)

Format and write frames.

Parametersframesis a list of frames as used by Failure.frames, with each frame being a list of (funcName, fileName, lineNumber, locals.items(), globals.items()) (type: list)
writethis will be called with formatted strings. (type: callable)
detailFour 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. (type: string)
EXCEPTION_CAUGHT_HERE = (source)

Undocumented

(type: str)
def _Traceback(stackFrames, tbFrames): (source)

Construct a fake traceback object using a list of frames. Note that although frames generally include locals and globals, this information is not kept by this method, since locals and globals are not used in standard tracebacks.

ParametersstackFrames[(methodname, filename, lineno, locals, globals), ...]
tbFrames[(methodname, filename, lineno, locals, globals), ...]
_inlineCallbacksExtraneous = (source)

Undocumented

(type: list)
def _extraneous(f): (source)

Mark the given callable as extraneous to inlineCallbacks exception reporting; don't show these functions.

Parametersfa function that you NEVER WANT TO SEE AGAIN in ANY TRACEBACK reported by Failure. (type: function)
Returnsf
def _safeReprVars(varsDictItems): (source)

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.

ParametersvarsDictItemsa sequence of (name, value) pairs as returned by e.g. locals().items().
Returnsa sequence of (name, repr) pairs.
DO_POST_MORTEM = (source)

Undocumented

(type: bool)
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.

def startDebugMode(): (source)

Enable debug hooks for Failures.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.