Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Elasticsearch.Net/Transport/Pipeline/RequestPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ public ElasticsearchResponse<TReturn> CallElasticsearch<TReturn>(RequestData req
(response as ElasticsearchResponse<Stream>)?.Body?.Dispose();
audit.Event = AuditEvent.BadResponse;
audit.Exception = e;
e.RethrowKeepingStackTrace();
return null; //dead code due to call to RethrowKeepingStackTrace()
throw;
}
}
}
Expand All @@ -419,8 +418,7 @@ public async Task<ElasticsearchResponse<TReturn>> CallElasticsearchAsync<TReturn
(response as ElasticsearchResponse<Stream>)?.Body?.Dispose();
audit.Event = AuditEvent.BadResponse;
audit.Exception = e;
e.RethrowKeepingStackTrace();
return null; //dead code due to call to RethrowKeepingStackTrace()
throw;
}
}
}
Expand Down
14 changes: 6 additions & 8 deletions src/Elasticsearch.Net/Transport/Transport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ public ElasticsearchResponse<TReturn> Request<TReturn>(HttpMethod method, string
pipeline.MarkDead(node);
seenExceptions.Add(pipelineException);
}
catch (ResolveException resolveException)
catch (ResolveException)
{
resolveException.RethrowKeepingStackTrace();
return null; //dead code due to call to RethrowKeepingStackTrace()
throw;
}
catch (Exception killerException)
{
Expand Down Expand Up @@ -148,10 +147,9 @@ public async Task<ElasticsearchResponse<TReturn>> RequestAsync<TReturn>(HttpMeth
pipeline.MarkDead(node);
seenExceptions.Add(pipelineException);
}
catch (ResolveException resolveException)
catch (ResolveException)
{
resolveException.RethrowKeepingStackTrace();
return null; //dead code due to call to RethrowKeepingStackTrace()
throw;
}
catch (Exception killerException)
{
Expand Down Expand Up @@ -186,7 +184,7 @@ private static void Ping(IRequestPipeline pipeline, Node node)
catch (PipelineException e) when (e.Recoverable)
{
pipeline.SniffOnConnectionFailure();
e.RethrowKeepingStackTrace();
throw;
}
}

Expand All @@ -199,7 +197,7 @@ private static async Task PingAsync(IRequestPipeline pipeline, Node node)
catch (PipelineException e) when (e.Recoverable)
{
await pipeline.SniffOnConnectionFailureAsync().ConfigureAwait(false);
e.RethrowKeepingStackTrace();
throw;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Tests/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# mode either u (unit test), i (integration test) or m (mixed mode)
mode: m
mode: u
# the elasticsearch version that should be started
elasticsearch_version: 2.2.0
# whether we want to forcefully reseed on the node, if you are starting the tests with a node already running
Expand Down