Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3794

Split Delphi application, protocol and transport exception subtypes into separate exceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • Delphi - Library
    • None
    • Patch Available
    • Patch

    Description

      It is much more convenient to work with a hierarchy of exceptions for several reasons, including, but not limited to the following:
      1) Writing exception handler filters is much simpler and clearer when one can simply say "on E: TTransportExceptionTimedOut do" instead of "on E: TTransportException do if E.Type_ = TTransportException.TExceptionType.TimedOut then".
      2) Ignoring exception types within the Delphi IDE is doable, but not by exception subtype, as with the Delphi library. It isn't possible to ignore transport timeouts and not ignore all other transport exception subtypes. This makes debugging much more challenging when stepping through code.

      I propose splitting the TApplicationException, TProtocolException and TTransportException classes into separate exception classes based on exception subtype. It should be possible to do so while retaining backward compatibility for code that relies on the old exception methodology.

      Attachments

        Activity

          People

            KyleJ61782 Kyle Johnson
            KyleJ61782 Kyle Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: