add try...catch
Докинул try catch, ибо иногда падал и было непонятно на каком репозитории
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<SolutionConfiguration>
|
||||
<Settings>
|
||||
<AllowParallelTestExecution>True</AllowParallelTestExecution>
|
||||
<SolutionConfigured>True</SolutionConfigured>
|
||||
</Settings>
|
||||
</SolutionConfiguration>
|
||||
@@ -7,8 +7,10 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JiraTimeBot.RepositoryProviders
|
||||
{
|
||||
@@ -72,6 +74,8 @@ namespace JiraTimeBot.RepositoryProviders
|
||||
AdditionalArguments = { "--encoding=utf-8" },
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
var log = repo.Log(logCommand);
|
||||
|
||||
foreach (var changeset in log)
|
||||
@@ -116,6 +120,13 @@ namespace JiraTimeBot.RepositoryProviders
|
||||
_log?.Trace($" - Найден changeset: {changeset.Timestamp} - {changeset.Branch} - {changeset.AuthorEmailAddress} - {commitMessage}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show($"Oops something went wrong in repo {repoDirectory}");
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
if (!workTasks.Any())
|
||||
{
|
||||
return new List<TaskTimeItem>();
|
||||
|
||||
Reference in New Issue
Block a user