thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-3916) Errors thrown from JavaScript client is strings and not errors
Date Wed, 01 Aug 2018 16:20:00 GMT

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

ASF GitHub Bot commented on THRIFT-3916:
----------------------------------------

jeking3 commented on issue #1075: THRIFT-3916 Throw proper errors from JS, not strings
URL: https://github.com/apache/thrift/pull/1075#issuecomment-409632979
 
 
   Original author has not responded to any comments and PR needs more work.  Closing the
PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Errors thrown from JavaScript client is strings and not errors
> --------------------------------------------------------------
>
>                 Key: THRIFT-3916
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3916
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler
>            Reporter: Simen Bekkhus
>            Priority: Minor
>              Labels: javascript
>
> In JavaScript, you can {{throw}} any object, including strings, but to get stack traces
one should throw {{Errors}}.
> The generated JS code throws the error string directly, instead of wrapping it in {{new
Error}}.
> Node core _only_ rejects with/throws Errors, never strings, and Thrift should follow
the same standard.
> https://nodejs.org/api/errors.html#errors_class_error
> {quote}
> All errors generated by Node.js, including all System and JavaScript errors, will either
be instances of, or inherit from, the Error class.
> {quote}
> PR for the change [here|https://github.com/apache/thrift/pull/1075].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message