Skip to content

Commit

Permalink
fix(tool): Improve error handling when we're unable to find a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectlyNormal committed Nov 17, 2024
1 parent e8945d3 commit 7cfce28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TypeContractor.Tool/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public Task<int> Execute()
{
context = ReflectionContextHelper.GetMetadataContext(_packPath, _dotnetVersion, _assemblyPath, Log.Instance);
}
catch (DirectoryNotFoundException ex)
{
Log.Instance.LogError(ex, ex.Message);
return Task.FromResult(1);
}
catch (FileNotFoundException ex)
{
Log.Instance.LogError(ex, ex.Message);
Expand Down

0 comments on commit 7cfce28

Please sign in to comment.