You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Henrique Mendonca (JIRA)" <ji...@apache.org> on 2011/02/17 19:32:24 UTC
[jira] Created: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Unexpected exceptions not proper handled on JS
----------------------------------------------
Key: THRIFT-1065
URL: https://issues.apache.org/jira/browse/THRIFT-1065
Project: Thrift
Issue Type: Bug
Components: JavaScript - Library
Affects Versions: 0.6
Reporter: Henrique Mendonca
Priority: Minor
Fix For: 0.7
Following THRIFT-550 and THRIFT-807:
We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrique Mendonca updated THRIFT-1065:
--------------------------------------
Attachment: THRIFT-1065-read-undefined-exceptions2.patch
remove some misplaced code (probably copied from another implementation?)
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-read-undefined-exceptions2.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (THRIFT-1065) Unexpected exceptions
not proper handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995978#comment-12995978 ]
Henrique Mendonca edited comment on THRIFT-1065 at 2/22/11 6:56 PM:
--------------------------------------------------------------------
e.g. if you remove any _throws_ declaration from ThriftTest.thrift:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
and call the service from the JS client side. The server throws then the "unexpected" exception and I was getting something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
Now, with this patch, it should still throw the exception (TApplicationException) on the JS client site
was (Author: henrique):
e.g. if you remove any _throws_ declaration from ThriftTest.thrift:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
and call the service from the JS client side. The server throws then the "unexpected" exception and I was getting something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
Now, with this patch, it should still throw the exception (TApplicationException) on the JS client site
ps.: there is something wrong with the Java test server (trunk) I keep getting:
[java] Incoming content: [1,"testVoid",1,0,{}]
[java] Outgoing content: Error:org/apache/thrift/server/ServerTestBase$TestHandler
is it just me?
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-qunit-clean-up.patch, THRIFT-1065-read-undefined-exceptions2.patch, THRIFT-1065-throw-appexception.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (THRIFT-1065) Unexpected exceptions
not proper handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995978#comment-12995978 ]
Henrique Mendonca edited comment on THRIFT-1065 at 2/17/11 6:55 PM:
--------------------------------------------------------------------
e.g. if you remove the _throws_ declaration from ThriftTest.thrift:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
and run the JS test (which throws the _unexpected_ exception)
I get something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
was (Author: henrique):
e.g. if you remove the _throws_ declaration from:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
ThriftTest.thrift and run the JS test (which throws the _unexpected_ exception)
I get something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-read-undefined-exceptions2.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrique Mendonca updated THRIFT-1065:
--------------------------------------
Attachment: THRIFT-1065-qunit-clean-up.patch
THRIFT-1065-throw-appexception.patch
apparently the java server is not encoding undeclared exceptions "properly" (it could be my impl., please see patch), but it works fine on C++
Incoming content: [1,"testException",1,0,{"1":{"str":"TApplicationException"}}]
[cpp] Outgoing content: [1,"testException",3,0,{"1":{"str":"This is a TApplicationException"},"2":{"i32":0}}]
[java] Outgoing content: Error:This is a TApplicationException
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-qunit-clean-up.patch, THRIFT-1065-read-undefined-exceptions2.patch, THRIFT-1065-throw-appexception.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-1065.
---------------------------------
Resolution: Fixed
Assignee: Henrique Mendonca
Yes Henrique, that's the way!
I Just committed the following stuff:
* qUnit test, modified a bit
* JavaServer Handler, modified to the same behavior as C++ (see THRIFT-847)
* original JavaScript patch
Thank you for making Thrift better!
Roger
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Assignee: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-qunit-clean-up.patch, THRIFT-1065-read-undefined-exceptions2.patch, THRIFT-1065-throw-appexception.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995978#comment-12995978 ]
Henrique Mendonca commented on THRIFT-1065:
-------------------------------------------
e.g. if you remove the _throws_ declaration from:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
ThriftTest.thrift and run the JS test (which throws the _unexpected_ exception)
I get something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-read-undefined-exceptions2.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (THRIFT-1065) Unexpected exceptions
not proper handled on JS
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995978#comment-12995978 ]
Henrique Mendonca edited comment on THRIFT-1065 at 2/18/11 12:28 PM:
---------------------------------------------------------------------
e.g. if you remove any _throws_ declaration from ThriftTest.thrift:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
and call the service from the JS client side. The server throws then the "unexpected" exception and I was getting something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
Now, with this patch, it should still throw the exception (TApplicationException) on the JS client site
ps.: there is something wrong with the Java test server (trunk) I keep getting:
[java] Incoming content: [1,"testVoid",1,0,{}]
[java] Outgoing content: Error:org/apache/thrift/server/ServerTestBase$TestHandler
is it just me?
was (Author: henrique):
e.g. if you remove the _throws_ declaration from ThriftTest.thrift:
_void testException(1: string arg) throws(1: Xception err1),_
*void testException(1: string arg),*
and run the JS test (which throws the _unexpected_ exception)
I get something like:
{quote}
fname not defined
var ret = input.readStructBegin(fname)
{quote}
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
> Attachments: THRIFT-1065-read-undefined-exceptions2.patch
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (THRIFT-1065) Unexpected exceptions not proper
handled on JS
Posted by "T Jake Luciani (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995965#comment-12995965 ]
T Jake Luciani commented on THRIFT-1065:
----------------------------------------
Can you provide an example?
> Unexpected exceptions not proper handled on JS
> ----------------------------------------------
>
> Key: THRIFT-1065
> URL: https://issues.apache.org/jira/browse/THRIFT-1065
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6
> Reporter: Henrique Mendonca
> Priority: Minor
> Labels: javascript, thrift
> Fix For: 0.7
>
>
> Following THRIFT-550 and THRIFT-807:
> We still get JS errors when any undeclared exception is thrown (if not defined on the service IDL)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira