From c903878b126c48113a1bd69ff4d0e80a08824814 Mon Sep 17 00:00:00 2001 From: Apollo3zehn Date: Mon, 11 Sep 2023 09:31:27 +0200 Subject: [PATCH] Do not catch OOM Exceptions --- .../StructuredFileDataSource.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Nexus.Sources.StructuredFile/StructuredFileDataSource.cs b/src/Nexus.Sources.StructuredFile/StructuredFileDataSource.cs index fb98b50..3f752f2 100644 --- a/src/Nexus.Sources.StructuredFile/StructuredFileDataSource.cs +++ b/src/Nexus.Sources.StructuredFile/StructuredFileDataSource.cs @@ -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); @@ -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"); @@ -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");