mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 13:51:53 +08:00
enhance: show inner exception message if possible when check update failed
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SourceGit.Models
|
||||
@@ -32,5 +33,24 @@ namespace SourceGit.Models
|
||||
}
|
||||
}
|
||||
|
||||
public class AlreadyUpToDate { }
|
||||
public class AlreadyUpToDate
|
||||
{
|
||||
}
|
||||
|
||||
public class SelfUpdateFailed
|
||||
{
|
||||
public string Reason
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public SelfUpdateFailed(Exception e)
|
||||
{
|
||||
if (e.InnerException is { } inner)
|
||||
Reason = inner.Message;
|
||||
else
|
||||
Reason = e.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user