[#] 包裹一些错误不再向外抛出

This commit is contained in:
huiyadanli 2019-10-06 19:13:00 +08:00
parent bb9a82a657
commit 62248f12e6
2 changed files with 24 additions and 16 deletions

View File

@ -259,7 +259,7 @@ namespace RevokeMsgPatcher
private void radioButtons_CheckedChanged(object sender, EventArgs e) private void radioButtons_CheckedChanged(object sender, EventArgs e)
{ {
ga.RequestPageView(GetCheckedRadioButtonNameEn() + "_switch"); ga.RequestPageView(GetCheckedRadioButtonNameEn() + "/switch", "切换标签页");
EnableAllButton(false); EnableAllButton(false);
RadioButton radioButton = sender as RadioButton; RadioButton radioButton = sender as RadioButton;
// 切换使用不同的防撤回对象 // 切换使用不同的防撤回对象

View File

@ -38,6 +38,8 @@ namespace RevokeMsgPatcher.Utils
} }
public async Task RequestPageViewAsync(string page, string title = null) public async Task RequestPageViewAsync(string page, string title = null)
{
try
{ {
if (!page.StartsWith("/")) if (!page.StartsWith("/"))
{ {
@ -58,6 +60,12 @@ namespace RevokeMsgPatcher.Utils
var content = new FormUrlEncodedContent(values); var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync(GAUrl, content); var response = await client.PostAsync(GAUrl, content);
} }
catch (Exception ex)
{
Console.WriteLine("GAHelper:" + ex.Message);
}
}
public void RequestPageView(string page, string title = null) public void RequestPageView(string page, string title = null)
{ {