Skip to content

Commit

Permalink
Nuget error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumanth K B committed Nov 9, 2023
1 parent f32711f commit c6c788b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/LCT.PackageIdentifier/NugetDevDependencyParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ private static bool IsTestProject(string projectPath)
catch (InvalidProjectFileException ex)
{
Logger.Debug($"IsTestProject(): Failed to read project file : " + projectPath, ex);
Logger.Warn($"IsTestProject: Failed to read project file : " + projectPath);
Logger.Warn($"IsTestProject: Failed to read project file, evaluation fails for : " + projectPath);
return false;
}
catch (InvalidOperationException ex)
{
Logger.Debug($"IsTestProject(): Failed to read project file : " + projectPath, ex);
Logger.Warn($"IsTestProject: Failed to read project file, Maybe there is already an equivalent project loaded in the project collection " + projectPath);
return false;
}
catch (MissingFieldException ex)
Expand All @@ -97,6 +103,12 @@ private static bool IsTestProject(string projectPath)
Logger.Warn($"IsTestProject: Failed to read project file : " + projectPath);
return false;
}
catch (IOException ex)
{
Logger.Debug($"IsTestProject(): Failed to read project file : " + projectPath, ex);
Logger.Warn($"IsTestProject: Failed to read project file : " + projectPath);
return false;
}

foreach (ProjectItem item in csProj.Items)
{
Expand Down

0 comments on commit c6c788b

Please sign in to comment.