mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Improve error handling a bit
This commit is contained in:
parent
d0454b7fa3
commit
dd8a29d546
@ -249,6 +249,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Environment.NewLine +
|
||||
webException.Source + ": " + webException.Message);
|
||||
}
|
||||
else if (translator.GetType() == typeof(GoogleTranslator2) && webException.Message.Contains("(400) Bad Request"))
|
||||
{
|
||||
MessageBox.Show("API key invalid - perhaps billing is not enabled?" + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
webException.Source + ": " + webException.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(webException.Source + ": " + webException.Message);
|
||||
|
@ -2620,7 +2620,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void linkLabelGoogleTranslateSignUp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://cloud.google.com/docs/authentication/api-keys");
|
||||
Process.Start("https://www.google.com/search?q=google+cloud+get+api+key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user