public NugetProblem AddProblem(AggregateException aggregate) { var message = "Fatal error"; Exception exception = aggregate; if (aggregate != null) { exception = aggregate.Flatten(); message = exception.Message; if (exception.InnerException != null) { exception = exception.InnerException; message = exception.Message; } } var problem = new NugetProblem(message, exception); AddProblem(problem); return problem; }
public NugetProblem AddProblem(AggregateException aggregate) { var message = "Fatal error"; Exception exception = aggregate; if (aggregate != null) { exception = aggregate.Flatten(); message = exception.Message; if (exception.InnerException != null) { exception = exception.InnerException; message = exception.Message; } } var problem = new NugetProblem(message, exception); AddProblem(problem); return(problem); }
public void AddProblem(NugetProblem problem) { _problems.Add(problem); }