Skip to content

Commit

Permalink
Merged Pull Request '#131 catch-non-pipeline-exceptions-also->main : …
Browse files Browse the repository at this point in the history
…Replace `catch (PipelineException e)` with `catch (Exception e)`.'

Replace `catch (PipelineException e)` with `catch (Exception e)`.
  • Loading branch information
Automation51D authored Oct 15, 2024
2 parents cd84eda + dc06bb5 commit 7d7b1b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ protected virtual string BuildJson(IFlowData data, PipelineConfig config, bool r
{
sequenceNumber = GetSequenceNumber(data);
}
catch (PipelineException e)
catch (Exception e)
{
if (requireSequenceNumber)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private void ServeContent(IContextAdapter context, IFlowData flowData, ContentTy
{
pipelineEvidenceKeyFilter = _pipeline.EvidenceKeyFilter;
}
catch (PipelineException ex)
catch (Exception ex)
{
_logger?.LogError(ex, $"Failed to get {nameof(_pipeline.EvidenceKeyFilter)} from {nameof(_pipeline)}");
hadFailures = true;
Expand Down Expand Up @@ -257,7 +257,7 @@ private void ServeContent(IContextAdapter context, IFlowData flowData, ContentTy
{
jsonData = flowData.GetFromElement(jsonElement);
}
catch (PipelineException ex)
catch (Exception ex)
{
_logger?.LogError(ex, "Failed to get data from {flowElementType}", jsonElement.GetType().Name);
jsonData = jsonElement.GetFallbackResponse(flowData);
Expand All @@ -279,7 +279,7 @@ private void ServeContent(IContextAdapter context, IFlowData flowData, ContentTy
{
jsData = flowData.GetFromElement(jsElement);
}
catch (PipelineException ex)
catch (Exception ex)
{
_logger?.LogError(ex, "Failed to get data from {flowElementType}", jsElement.GetType().Name);
jsData = jsElement.GetFallbackResponse(flowData, GetJsonData());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public static IFlowData Process(HttpRequest request)
{
filler = new EvidenceFiller(flowData);
}
catch (PipelineException ex)
catch (Exception ex)
{
flowData.AddError(ex, null);
throw;
Expand Down

0 comments on commit 7d7b1b7

Please sign in to comment.