Fixed: Error trying to notify user when process not UserInteractive

(cherry picked from commit 45a72c7918112cc154fc801de334663c3e0e5919)

Closes #3955
pull/4068/head v1.4.0.3554
Qstick 1 year ago committed by Bogdan
parent 4ce8d38809
commit 1455238520

@ -30,9 +30,12 @@ namespace NzbDrone
}
catch (Exception e)
{
Logger.Fatal(e, "EPIC FAIL: " + e.Message);
var message = string.Format("{0}: {1}", e.GetType().Name, e.ToString());
MessageBox.Show(text: message, buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error, caption: "Epic Fail!");
Logger.Fatal(e, "EPIC FAIL");
if (RuntimeInfo.IsUserInteractive)
{
MessageBox.Show($"{e.GetType().Name}: {e.Message}", buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error, caption: "Epic Fail!");
}
}
}
}

Loading…
Cancel
Save