Ticket #2732 (closed enhancement: invalid)

Opened 3 years ago

Last modified 21 months ago

foolscap: find actual exception types in CopiedFailure

Reported by: strank Owned by: warner
Priority: normal Milestone:
Component: foolscap Keywords:
Cc: strank Branch:
Author: Launchpad Bug:

Description

The patch adds a mechanism for replacing the string representation of an exception type (that got sent over the wire) with the actual exception type. This is limited to "known" exceptions, currently those in exceptions and those in foolscap.tokens.

Other exceptions are represented by a new Exception subclass. (I prefer that but it is not necessary for the rest of the patch.)

This change gets rid of copyable.RemoteCopyOldStyle, and copyable._RemoteCopyBase could go too.

What prompted the change: I used foolscap inside an inlineCallbacks generator. There, a CopiedFailure became a string exception called "exceptions.KeyError" and escaped my except Exception: clause - which took me some time to figure out. ;-)

Attachments

foolscap-exceptions.patch Download (5.9 KB) - added by strank 3 years ago.

Change History

Changed 3 years ago by strank

Changed 21 months ago by exarkun

  • status changed from new to closed
  • resolution set to invalid

It looks like there's  a ticket for this issue in the Foolscap issue tracker. That's the right place for this, as Foolscap is no longer developed as part of Twisted.

Note: See TracTickets for help on using tickets.