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

Jorge Bay commented on TINKERPOP-1744:
--------------------------------------

The solution is straightforward, if anybody wants to contribute: .NET has a 
utility for preserving the stack trace when rethrowing, you can look to 
https://msdn.microsoft.com/en-us/library/system.runtime.exceptionservices.exceptiondispatchinfo.aspx

Otherwise, I think I will be able to have a pull request for this by tomorrow.

> Gremlin .NET: Exception from sync execution gets wrapped in AggregateException
> ------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1744
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1744
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: language-variant
>            Reporter: Jorge Bay
>
> When getting a server side exception and executing a traversal synchronously 
> (ie: {{Next()}}, {{ToList()}}, ...), Gremlin.Net throws the original 
> exception wrapped in a {{AggregateException}}, which is not desired.
> This is caused by the {{Task.Wait()}} call on {{RemoteStrategy.Apply()}} 
> method.
> We should catch the wrapped exception and throw the original.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to