Ticket #2732 (closed enhancement: invalid )

Opened 2 years ago

Last modified 7 months ago

foolscap: find actual exception types in CopiedFailure

Reported by: strank Assigned to: warner
Type: enhancement 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 (5.9 kB) - added by strank 2 years ago.

Change History

  2007-07-10 16:22:51+00:00 changed by strank

  • attachment foolscap-exceptions.patch added

  2008-12-08 21:47:50+00:00 changed by exarkun

  • status changed from new to closed
  • resolution set to invalid
  • launchpad_bug deleted
  • branch deleted
  • branch_author deleted

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.