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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: