Details

    • Patch Info:
      Patch Available

      Description

      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.

      1. THRIFT-1267-ex-ns-fixes+tests.patch
        7 kB
        Henrique Mendonça
      2. Makefile
        1 kB
        Henrique Mendonça
      3. client.js
        4 kB
        Henrique Mendonça
      4. server.js
        5 kB
        Henrique Mendonça
      5. package.json
        0.8 kB
        Henrique Mendonça
      6. thrift-1267-callback-ns-fix.patch
        2 kB
        Hans Duedal
      7. thrift-1267-callback.patch
        2 kB
        Hans Duedal
      8. nodejs-exception.patch
        1 kB
        Hans Duedal

        Issue Links

          Activity

          Hans Duedal created issue -
          Hans Duedal made changes -
          Field Original Value New Value
          Attachment nodejs-exception.patch [ 12490664 ]
          Bryan Duxbury made changes -
          Fix Version/s 0.8 [ 12316293 ]
          Fix Version/s 0.7 [ 12315360 ]
          Hans Duedal made changes -
          Attachment thrift-1267-callback.patch [ 12491642 ]
          Hans Duedal made changes -
          Attachment thrift-1267-callback-ns-fix.patch [ 12493302 ]
          Roger Meier made changes -
          Component/s Node.js - Compiler [ 12314319 ]
          Jake Farrell made changes -
          Fix Version/s 0.8 [ 12316293 ]
          Jake Farrell made changes -
          Fix Version/s 0.8 [ 12316293 ]
          Jake Farrell made changes -
          Fix Version/s 0.9 [ 12316294 ]
          Fix Version/s 0.8 [ 12316293 ]
          Henrique Mendonça made changes -
          Attachment THRIFT-1267-ns-fixes.patch [ 12510026 ]
          Attachment server.js [ 12510027 ]
          Henrique Mendonça made changes -
          Attachment server.js [ 12510027 ]
          Henrique Mendonça made changes -
          Attachment package.json [ 12510243 ]
          Attachment server.js [ 12510244 ]
          Attachment client.js [ 12510245 ]
          Attachment Makefile [ 12510246 ]
          Attachment THRIFT-1267-ex-ns-fixes+tests.patch [ 12510247 ]
          Henrique Mendonça made changes -
          Attachment THRIFT-1267-ns-fixes.patch [ 12510026 ]
          Henrique Mendonça made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Assignee Henrique Mendonca [ henrique ]
          Roger Meier made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Jake Farrell made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Roger Meier made changes -
          Link This issue incorporates THRIFT-1134 [ THRIFT-1134 ]

            People

            • Assignee:
              Henrique Mendonça
              Reporter:
              Hans Duedal
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development