[#] 包裹一些错误不再向外抛出
This commit is contained in:
@@ -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;
|
||||||
// 切换使用不同的防撤回对象
|
// 切换使用不同的防撤回对象
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user