Simen Bekkhus created THRIFT-3916:
-------------------------------------
Summary: 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
Reporter: Simen Bekkhus
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}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)