Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 25c9a8c

Browse files
committed
Log task exceptions properly
1 parent d6bca78 commit 25c9a8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.Api/Tasks/TaskRunnerBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private void Start()
143143

144144
if (!repeat)
145145
{
146-
Logger.Error(TaskThreadExceptionRestartError, e);
146+
Logger.Error(TaskThreadExceptionRestartError, e.InnerException ?? e);
147147
Thread.Sleep(FailureDelayDefault);
148148
}
149149
else
@@ -219,7 +219,7 @@ private void RunLoop()
219219
}
220220
catch (Exception ex)
221221
{
222-
Logger.Error(ex);
222+
Logger.Error(ex.InnerException ?? ex);
223223
activeTask.RaiseOnEnd();
224224
activeTask = null;
225225
}

0 commit comments

Comments
 (0)