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