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

Unify the exceptions returned in generated Go code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.9.1
    • Go - Compiler
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: