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

Hudson commented on THRIFT-1267:
--------------------------------

Integrated in Thrift #385 (See [https://builds.apache.org/job/Thrift/385/])
    THRIFT-1267 Node.js can't throw exceptions
Patch: Henrique Mendonca

roger : http://svn.apache.org/viewvc/?view=rev&rev=1230797
Files : 
* /thrift/trunk/.gitignore
* /thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc
* /thrift/trunk/configure.ac
* /thrift/trunk/lib/nodejs/examples/Makefile
* /thrift/trunk/lib/nodejs/examples/server.js
* /thrift/trunk/lib/nodejs/examples/server_multitransport.js
* /thrift/trunk/test/Makefile.am
* /thrift/trunk/test/nodejs
* /thrift/trunk/test/nodejs/Makefile.am
* /thrift/trunk/test/nodejs/client.js
* /thrift/trunk/test/nodejs/package.json
* /thrift/trunk/test/nodejs/server.js
* /thrift/trunk/test/test.sh

                
> Node.js can't throw exceptions. 
> --------------------------------
>
>                 Key: THRIFT-1267
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1267
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, Node.js - Compiler
>    Affects Versions: 0.7
>            Reporter: Hans Duedal
>            Assignee: Henrique Mendonca
>              Labels: compiler, javascript, node, nodejs
>             Fix For: 0.9
>
>         Attachments: Makefile, THRIFT-1267-ex-ns-fixes+tests.patch, 
> client.js, nodejs-exception.patch, package.json, server.js, 
> thrift-1267-callback-ns-fix.patch, thrift-1267-callback.patch
>
>
> There is no way as far as I can tell for node.js servers to throw thrift 
> exceptions.
> I have made a patch to allow it to throw exceptions. It lets the node.js 
> server implementation give params directly to the result object, thereby 
> being able to specify the exception. It doesn't affect normal (non exception) 
> return data.
> Test case: https://gist.github.com/1151782
> Install thrift module "npm install thrift", generate thrift "thrift --gen 
> js:node test.thrift" and run server then client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to