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

Commit 01a9209

Browse files
authored
Merge pull request #775 from github-for-unity/nitpick
Fix update check log message
2 parents c91fffa + b08e508 commit 01a9209

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/GitHub.Logging/Extensions/ExceptionExtensions.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,17 @@ public static string GetExceptionMessage(this Exception ex)
2020
message += Environment.NewLine + String.Join(Environment.NewLine, stack.Skip(1).SkipWhile(x => x.Contains("GitHub.Logging")).ToArray());
2121
return message;
2222
}
23+
24+
public static string GetExceptionMessageShort(this Exception ex)
25+
{
26+
var message = ex.ToString();
27+
var inner = ex.InnerException;
28+
while (inner != null)
29+
{
30+
message += Environment.NewLine + inner.ToString();
31+
inner = inner.InnerException;
32+
}
33+
return message;
34+
}
2335
}
2436
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UpdateCheck.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static void CheckForUpdates()
6363
var download = new DownloadTask(TaskManager.Instance.Token, EntryPoint.Environment.FileSystem, UpdateFeedUrl, EntryPoint.Environment.UserCachePath)
6464
.Catch(ex =>
6565
{
66-
LogHelper.Warning(@"Error downloading update check:{0} ""{1}"" Message:""{2}""", UpdateFeedUrl, ex.GetType().ToString(), ex.Message);
66+
LogHelper.Warning(@"Error downloading update check:{0} ""{1}""", UpdateFeedUrl, ex.GetExceptionMessageShort());
6767
return true;
6868
});
6969
download.OnEnd += (thisTask, result, success, exception) =>

0 commit comments

Comments
 (0)