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

Unify the exceptions returned in generated Go code

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.9.1
    • Component/s: Go - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The code generated by the Go compiler is quite awful; every type of exception that can be thrown creates an additional return value, so in the end any call looks like

      ret, exA, exB, exC, exD, exE, exF, err = rpc.DoSomething(bla);

      Since err is of type os.Error, which should cover all types of exceptions, the attached patch should make the interface significantly more sane by reducing the amount of different return values.

        Attachments

        1. thrift-go-single-error-type.patch
          6 kB
          Tonnerre Lombard

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tonnerre Tonnerre Lombard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: