Skip to content

Commit

Permalink
Use Graceful exception to only report the error
Browse files Browse the repository at this point in the history
  • Loading branch information
joeloff committed Sep 16, 2024
1 parent 65e2ef3 commit aed512a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ public async Task<string> DownloadPackageAsync(PackageId packageId,

if (!ToolPackageInstance.IsToolPackage(doc))
{
throw new ToolPackageException(string.Format(LocalizableStrings.NotATool, packageId));
throw new GracefulException(string.Format(LocalizableStrings.NotATool, packageId));
}
}
else
{
throw new ToolPackageException(string.Format(LocalizableStrings.NotATool, packageId));
throw new GracefulException(string.Format(LocalizableStrings.NotATool, packageId));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
{
if (!ToolPackageInstance.IsToolPackage(package.Nuspec.Xml))
{
throw new ToolPackageException(string.Format(NuGetPackageDownloader.LocalizableStrings.NotATool, packageId));
throw new GracefulException(string.Format(NuGetPackageDownloader.LocalizableStrings.NotATool, packageId));
}

if (isGlobalTool)
Expand Down

0 comments on commit aed512a

Please sign in to comment.