[ 
https://issues.apache.org/jira/browse/THRIFT-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13865912#comment-13865912
 ] 

Pierre Lamot commented on THRIFT-2205:
--------------------------------------

Hi,

You *must* use new on the exceptions when throwing them, otherwise, the object 
isn't properly initialized. ex:

>    throw *new* Thrift.TException("TMultiplexedProcessor: Unknown service: " + 
> sname);

the missing new  cause a bug in server.js when checking 

>   else if (err.message === "Invalid type: undefined") {

I'm currently experiencing some issue with your patch. multiplexed services 
tests are failing in secondclient.secondtestString, I haven't find yet the 
cause (I'm using node v0.10.20 under ubuntu 13.10)

I will update my patch for JSONProtocol uppon yours, however your patch didn't 
seems to apply properly on master's head (I had some rejection on transport.js 
(trivial nonetheless), did you forget the 0001 patch?

i did patch -p1 < 0002-xxx.patch


Pierre 

> Node.js Test Server to support test.js JavaScript Browser test and sundry 
> fixes
> -------------------------------------------------------------------------------
>
>                 Key: THRIFT-2205
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2205
>             Project: Thrift
>          Issue Type: Improvement
>          Components: JavaScript - Library, Node.js - Library
>    Affects Versions: 1.0
>         Environment: All
>            Reporter: Randy Abernethy
>            Assignee: Randy Abernethy
>            Priority: Minor
>              Labels: node, nodejs
>         Attachments: 0002-repairs-Node-JSON-and-Buffer-and-adds-tests.patch
>
>
> Adds lib/nodejs/test/testsvr.js 
> This server depends on ThriftTest[.js] and runs clean with test.js in the 
> browser.
> Also in this patch:
> Repairs some shortfall in the Node JSON Protocol and transport. Fixes 
> overflow on Javascript I64 tests. Improves static_server header output.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to