Skip to content

Commit

Permalink
Do not catch OOM Exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Sep 11, 2023
1 parent 82d8673 commit c903878
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Nexus.Sources.StructuredFile/StructuredFileDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ protected virtual async Task ReadAsync(

await ReadAsync(readInfo, readRequests, cancellationToken);
}
catch (OutOfMemoryException)
{
throw;
}
catch (Exception ex)
{
Logger.LogDebug(ex, "Could not process file {FilePath}", filePath);
Expand Down Expand Up @@ -500,6 +504,10 @@ protected virtual async Task ReadAsync(
) / fileSourceGroups.Count);
}
}
catch (OutOfMemoryException)
{
throw;
}
catch (Exception ex)
{
Logger.LogError(ex, "Could not read file source group");
Expand Down Expand Up @@ -686,6 +694,10 @@ async Task IDataSource.ReadAsync(
{
await ReadAsync(begin, end, requests, progress, cancellationToken);
}
catch (OutOfMemoryException)
{
throw;
}
catch (Exception ex)
{
Logger.LogError(ex, "Could not read catalog items");
Expand Down

0 comments on commit c903878

Please sign in to comment.