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

JavaScript TException should be a constructor function

    XMLWordPrintableJSON

Details

    Description

      The JavaScript TException is declared as an object with a prototype property assigned to it.
      It should be declared as a constructor function with a prototype. Otherwise exceptions derived from TException using Thrift.inherits are not instances of TException.

      Example:
      function DerivedException() {};
      Thrift.inherits(DerivedException, Thrift.TException);
      var ex = new DerivedException();
      ex instanceof Thrift.TException // => Error as TException is not a function

      Attachments

        Activity

          People

            pascal.bach Pascal Bach
            pascal.bach Pascal Bach
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: