Skip to content

Commit

Permalink
给Desktop的网络请求增加远程模式或本地模式的提示
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKZL committed Sep 16, 2024
1 parent 68b89c4 commit deffc27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Desktop/NetWork/Get.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public static T GetBody<T>(string url, Dictionary<string, string> _dic = null)
if (First)
{
First = false;
Log.Warn(nameof(GetBody), $"发起Get请求出错,URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex);
Log.Warn(nameof(GetBody), $"发起Get请求出错({(Core.Config.Core_RunConfig._DesktopRemoteServer?"远程模式":"本地模式")}),URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex);
}
else
{
Log.Warn(nameof(GetBody), $"发起Get请求出错,URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex, false);
Log.Warn(nameof(GetBody), $"发起Get请求出错({(Core.Config.Core_RunConfig._DesktopRemoteServer?"远程模式":"本地模式")}),URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex, false);
}

return default;
Expand Down
6 changes: 3 additions & 3 deletions Desktop/NetWork/Post.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ public class Post
if (First)
{
First = false;
Log.Warn(nameof(PostBody), $"发起Post请求出错,URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex);
Log.Warn(nameof(PostBody), $"发起Post请求出错({(Core.Config.Core_RunConfig._DesktopRemoteServer?"远程模式":"本地模式")}),URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex);
}
else
{
Log.Warn(nameof(PostBody), $"发起Post请求出错,URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex, false);
Log.Warn(nameof(PostBody), $"发起Post请求出错({(Core.Config.Core_RunConfig._DesktopRemoteServer?"远程模式":"本地模式")}),URL:[{url}],错误堆栈:\r\n{ex.ToString()}", ex, false);
}

if (ex is TaskCanceledException)
{
Log.Warn(nameof(PostBody), $"发起Post请求超时,URL:[{url}]", ex);
Log.Warn(nameof(PostBody), $"发起Post请求超时({(Core.Config.Core_RunConfig._DesktopRemoteServer?"远程模式":"本地模式")}),URL:[{url}]", ex);
}

return default;
Expand Down

0 comments on commit deffc27

Please sign in to comment.