(self)
| 576 | channel._enqueue_handlers(message, message._handle) |
| 577 | |
| 578 | def _handle(self): |
| 579 | channel = self.channel |
| 580 | handler = channel._get_handler_for("event", self.event) |
| 581 | try: |
| 582 | try: |
| 583 | result = handler(self) |
| 584 | assert ( |
| 585 | result is None |
| 586 | ), f"Handler {util.srcnameof(handler)} tried to respond to {self.describe()}." |
| 587 | except MessageHandlingError as exc: |
| 588 | if not exc.applies_to(self): |
| 589 | raise |
| 590 | log.error( |
| 591 | "Handler {0}\ncouldn't handle {1}:\n{2}", |
| 592 | util.srcnameof(handler), |
| 593 | self.describe(), |
| 594 | str(exc), |
| 595 | ) |
| 596 | except Exception: |
| 597 | log.reraise_exception( |
| 598 | "Handler {0}\ncouldn't handle {1}:", |
| 599 | util.srcnameof(handler), |
| 600 | self.describe(), |
| 601 | ) |
| 602 | |
| 603 | |
| 604 | NO_RESPONSE = object() |
nothing calls this directly
no test coverage detected