refine error message

This commit is contained in:
clowwindy
2015-01-14 01:45:27 +08:00
parent 38c597ba0c
commit 40aded9571
3 changed files with 12 additions and 9 deletions
+8 -6
View File
@@ -48,10 +48,11 @@ namespace Shadowsocks.Controller
//Must Notify IE first, or the connections do not chanage
CopyProxySettingFromLan();
}
catch (Exception)
catch (Exception e)
{
MessageBox.Show("can not change registry!");
throw;
Logging.LogUsefulException(e);
// TODO this should be moved into views
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}
@@ -68,10 +69,11 @@ namespace Shadowsocks.Controller
SystemProxy.NotifyIE();
CopyProxySettingFromLan();
}
catch (Exception)
catch (Exception e)
{
MessageBox.Show("can not change registry!");
throw;
Logging.LogUsefulException(e);
// TODO this should be moved into views
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}
+2 -1
View File
@@ -43,5 +43,6 @@ Disabled=已禁用代理
Update PAC from GFWList=从 GFWList 更新 PAC
Failed to update PAC file =更新 PAC 文件失败
PAC updated=更新 PAC 成功
"Failed to find QRCode=无法找到二维码
No QRCode found. Try to zoom in or move it to the center of the screen.=找不到二维码,尝试把它放大或者移动到靠近屏幕中间的位置
Failed to decode QRCode=无法解析二维码
Failed to update registry=无法修改注册表
@@ -435,7 +435,7 @@ namespace Shadowsocks.View
}
}
}
MessageBox.Show(I18N.GetString("Failed to find QRCode"));
MessageBox.Show(I18N.GetString("No QRCode found. Try to zoom in or move it to the center of the screen."));
}
void splash_FormClosed(object sender, FormClosedEventArgs e)
@@ -451,7 +451,7 @@ namespace Shadowsocks.View
private void AutoStartupItem_Click(object sender, EventArgs e) {
AutoStartupItem.Checked = !AutoStartupItem.Checked;
if (!AutoStartup.Set(AutoStartupItem.Checked)) {
MessageBox.Show("Failed to edit registry");
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}
}