Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
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