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

Update Exception class generation to TException decendent

    XMLWordPrintableJSON

Details

    Description

      Make all generated Exception objects derived classes of TExceptions instead of Exceptions. This allows callers to handle all errors of their service by catching TException, eliminating the need for multiple catch blocks where not required by the client code.

      This follows the more recent patterns set for C++, PHP, Perl.

      The languages affects are
      Java, python, Cocoa, csharp

      This could negatively affect code where the base exception class TException is handled prior to the generated exception classes.

      e.g.
      try {
      } catch (TException te) {
      } catch (ThriftAppException tae) {
      }

      Patch available for Java, can build patches for python, cocoa and csharp at the same time.

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              jking3 James E. King III
              madsmith Martin Smith
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified