Exception raised by `IOStream` methods when the stream is closed. Note that the close callback is scheduled to run *after* other callbacks on the stream (to allow for buffered data to be processed), so you may see this error before you see the close callback. The ``real_error`` att
| 82 | |
| 83 | |
| 84 | class StreamClosedError(IOError): |
| 85 | """Exception raised by `IOStream` methods when the stream is closed. |
| 86 | |
| 87 | Note that the close callback is scheduled to run *after* other |
| 88 | callbacks on the stream (to allow for buffered data to be processed), |
| 89 | so you may see this error before you see the close callback. |
| 90 | |
| 91 | The ``real_error`` attribute contains the underlying error that caused |
| 92 | the stream to close (if any). |
| 93 | |
| 94 | .. versionchanged:: 4.3 |
| 95 | Added the ``real_error`` attribute. |
| 96 | """ |
| 97 | |
| 98 | def __init__(self, real_error: Optional[BaseException] = None) -> None: |
| 99 | super().__init__("Stream is closed") |
| 100 | self.real_error = real_error |
| 101 | |
| 102 | |
| 103 | class UnsatisfiableReadError(Exception): |
no outgoing calls
no test coverage detected