You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Hans Duedal (JIRA)" <ji...@apache.org> on 2011/09/07 13:35:09 UTC

[jira] [Updated] (THRIFT-1267) Node.js can't throw exceptions.

     [ https://issues.apache.org/jira/browse/THRIFT-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Duedal updated THRIFT-1267:
--------------------------------

    Attachment: thrift-1267-callback-ns-fix.patch

New version. The previous one didn't get the namespace right for exceptions that where included from other files.

> Node.js can't throw exceptions. 
> --------------------------------
>
>                 Key: THRIFT-1267
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1267
>             Project: Thrift
>          Issue Type: Improvement
>          Components: JavaScript - Compiler
>    Affects Versions: 0.7
>            Reporter: Hans Duedal
>              Labels: compiler, javascript, node, nodejs
>             Fix For: 0.8
>
>         Attachments: nodejs-exception.patch, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira