Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Commit 255d5c2

Browse files
committed
log exceptions
1 parent 4aa5c91 commit 255d5c2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/Microsoft.Net.Http.Server/RequestProcessing/Response.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,9 @@ private void NotifyOnResponseCompleted()
875875
{
876876
actionPair.Item1(actionPair.Item2);
877877
}
878-
catch
878+
catch (Exception ex)
879879
{
880-
// Ignore exceptions
880+
RequestContext.Logger.LogWarning(Resources.Warning_ExceptionInOnResponseCompletedAction, ex);
881881
}
882882
}
883883
}

src/Microsoft.Net.Http.Server/Resources.Designer.cs

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Microsoft.Net.Http.Server/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,7 @@
147147
<data name="Exception_WrongIAsyncResult" xml:space="preserve">
148148
<value>The given IAsyncResult does not match this opperation.</value>
149149
</data>
150+
<data name="Warning_ExceptionInOnResponseCompletedAction" xml:space="preserve">
151+
<value>Exception occured in a registered response completed action.</value>
152+
</data>
150153
</root>

0 commit comments

Comments
 (0)