Skip to content

Commit d7c5f5d

Browse files
committed
catch exception while checking for updates
1 parent 459a8fc commit d7c5f5d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Asterion/Services/Modrinth/ModrinthService.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,13 @@ public bool ForceUpdate()
261261

262262
private void checkTimer_Elapsed(object? sender, ElapsedEventArgs e)
263263
{
264-
if (!_updateWorker.IsBusy) _updateWorker.RunWorkerAsync();
264+
try {
265+
if (!_updateWorker.IsBusy) _updateWorker.RunWorkerAsync();
266+
}
267+
catch (Exception ex)
268+
{
269+
_logger.LogCritical("Error while checking for updates: {Exception}", ex.Message);
270+
}
265271
}
266272

267273
/// <summary>

0 commit comments

Comments
 (0)