mirror of
https://github.com/ckaczor/JenkinsStatusWindow.git
synced 2026-02-16 18:47:44 -05:00
Make sure timer restarts in case of exception
This commit is contained in:
@@ -71,6 +71,8 @@ namespace JenkinsStatusWindow
|
||||
}
|
||||
|
||||
private void UpdateText()
|
||||
{
|
||||
try
|
||||
{
|
||||
var textResult = GetText();
|
||||
|
||||
@@ -81,9 +83,21 @@ namespace JenkinsStatusWindow
|
||||
|
||||
_floatingStatusWindow.IconToolTipText = textResult.TooltipText.ToString();
|
||||
});
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
_dispatcher.Invoke(() =>
|
||||
{
|
||||
_floatingStatusWindow.SetText(exception.Message);
|
||||
|
||||
_floatingStatusWindow.IconToolTipText = exception.Message;
|
||||
});
|
||||
}
|
||||
finally
|
||||
{
|
||||
_refreshTimer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private TextResult GetText()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user