Go to the latest version of this document.

# ``twisted`.`logger`.`Operation``

class documentation

`class Operation(Protocol): (source)`

View In Hierarchy

An `Operation` represents the success (or lack thereof) of code performed within the body of the `Logger.failureHandler` context manager.

Property | `failed` | Did the operation fail? `True` iff the code raised an exception; `False` while the code is running and `False` if it completed without error.
Property | `failure` | Did the operation raise an exception? If so, this `Failure` is that exception.
Property | `succeeded` | Did the operation succeed? `True` iff the code completed without raising an exception; `False` while the code is running and `False` if it raises an exception.

@property
failed: `bool` = (source)

Did the operation fail? `True` iff the code raised an exception; `False` while the code is running and `False` if it completed without error.

@property
failure: `Failure | None` = (source)

Did the operation raise an exception? If so, this `Failure` is that exception.

@property
succeeded: `bool` = (source)

Did the operation succeed? `True` iff the code completed without raising an exception; `False` while the code is running and `False` if it raises an exception.