10 types derived from GracefulException
dotnet (5)
NugetPackageDownloader\ToolPackageException.cs (1)
10internal class NuGetPackageInstallerException : GracefulException
NugetSearch\NugetSearchApiRequestException.cs (1)
10internal class NugetSearchApiRequestException(string message) : GracefulException([message], null, false)
ToolManifest\ToolManifestCannotBeFoundException.cs (1)
10internal class ToolManifestCannotBeFoundException : GracefulException
ToolManifest\ToolManifestException.cs (1)
10internal class ToolManifestException(string message) : GracefulException([message], null, false)
ToolPackage\ToolPackageException.cs (1)
10internal class ToolPackageException : GracefulException
dotnet-aot (3)
src\sdk\src\Cli\dotnet\NugetSearch\NugetSearchApiRequestException.cs (1)
10internal class NugetSearchApiRequestException(string message) : GracefulException([message], null, false)
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestCannotBeFoundException.cs (1)
10internal class ToolManifestCannotBeFoundException : GracefulException
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestException.cs (1)
10internal class ToolManifestException(string message) : GracefulException([message], null, false)
Microsoft.DotNet.Cli.Utils (2)
CommandAvailableAsDotNetToolException.cs (1)
6public class CommandAvailableAsDotNetToolException : GracefulException
CommandUnknownException.cs (1)
6public class CommandUnknownException : GracefulException
181 instantiations of GracefulException
dotnet (143)
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (2)
88throw new GracefulException(string.Format(CliStrings.NeedRunToolRestore, 97throw new GracefulException(string.Format(CliStrings.NeedRunToolRestore,
CommandFactory\CommandResolution\PackagedCommandSpecFactory.cs (1)
80throw new GracefulException(string.Format(
CommandFactory\CommandResolution\PackagedCommandSpecFactoryWithCliRuntime.cs (1)
24throw new GracefulException(string.Format(CliStrings.CouldNotFindToolRuntimeConfigFile,
CommandFactory\CommandResolution\ProjectFactory.cs (1)
78throw new GracefulException(string.Format(
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (2)
324throw new GracefulException(CliStrings.DepsJsonGeneratorProjectNotSet); 434throw new GracefulException(string.Format(CliStrings.UnableToGenerateDepsJson, toolDepsJsonGeneratorProject));
CommandFactory\CommandResolution\ToolPathCalculator.cs (1)
33throw new GracefulException(string.Format(
Commands\Package\Add\PackageAddCommand.cs (2)
61throw new GracefulException(string.Format(CliCommandStrings.CmdDGFileIOException, projectFilePath), ioex); 130throw new GracefulException(string.Format(CliCommandStrings.CmdDGFileException, projectFilePath));
Commands\Package\List\PackageListCommand.cs (4)
148throw new GracefulException(CliStrings.MoreThanOneSolutionInDirectory, resultPath); 165throw new GracefulException(CliCommandStrings.NoProjectsOrSolutions, resultPath); 175throw new GracefulException(CliStrings.MoreThanOneProjectInDirectory, resultPath); 182throw new GracefulException(CliCommandStrings.PackageListFileNotFound, resultPath);
Commands\Package\PackageCommandParser.cs (1)
111(true, true) => throw new Utils.GracefulException(CliCommandStrings.CannotCombineOptions, fileOption!.Name, projectOption!.Name),
Commands\Package\Remove\PackageRemoveCommand.cs (1)
24throw new GracefulException(CliCommandStrings.PackageRemoveSpecifyExactlyOnePackageReference);
Commands\Project\Convert\ProjectConvertCommand.cs (4)
46throw new GracefulException(CliCommandStrings.InvalidFilePath, file); 324throw new GracefulException(CliCommandStrings.ProjectConvertDuplicateRefFolderName, refTargetDirectory); 329throw new GracefulException(CliCommandStrings.DirectoryAlreadyExists, refTargetDirectory); 647throw new GracefulException(CliCommandStrings.DirectoryAlreadyExists, targetDirectory);
Commands\Reference\Add\ReferenceAddCommand.cs (2)
43throw new GracefulException(CliCommandStrings.InvalidFilePath, _fileOrDirectory); 117throw new GracefulException(CliCommandStrings.InvalidOptionForFileBasedApp, Definition.FrameworkOption.Name);
Commands\Reference\List\ReferenceListCommand.cs (1)
42throw new GracefulException(CliCommandStrings.InvalidFilePath, _fileOrDirectory);
Commands\Reference\Remove\ReferenceRemoveCommand.cs (3)
33throw new GracefulException(CliStrings.SpecifyAtLeastOneReferenceToRemove); 46throw new GracefulException(CliCommandStrings.InvalidFilePath, _fileOrDirectory); 80throw new GracefulException(CliCommandStrings.InvalidOptionForFileBasedApp, Definition.FrameworkOption.Name);
Commands\Run\RunCommand.cs (13)
210throw new GracefulException(CliCommandStrings.RunCommandDeployFailed); 226throw new GracefulException( 513throw new GracefulException(CliCommandStrings.RunCommandException); 636throw new GracefulException(string.Format(CliCommandStrings.RunCommandSpecifiedFileIsNotAValidProject, projectFilePath), e); 718throw new GracefulException(CliCommandStrings.RunCommandEvaluationExceptionBuildFailed, Constants.ComputeRunArguments); 728throw new GracefulException( 769throw new GracefulException(CliCommandStrings.CmdNonExistentFileErrorDescription, projectFilePath); 780throw new GracefulException(CliCommandStrings.RunCommandExceptionNoProjects, projectFileOrDirectoryPath, "--project"); 796throw new GracefulException(CliCommandStrings.RunCommandExceptionMultipleProjects, directory); 866throw new GracefulException(CliCommandStrings.CannotCombineOptions, definition.ProjectOption.Name, definition.FileOption.Name); 921throw new GracefulException(CliCommandStrings.InvalidOptionForStdin, definition.NoBuildOption.Name); 926throw new GracefulException(CliCommandStrings.InvalidOptionForStdin, definition.LaunchProfileOption.Name); 1035throw new GracefulException(CliStrings.OnlyOneProjectAllowed);
Commands\Run\VirtualProjectBuildingCommand.cs (1)
1300throw new GracefulException(
Commands\Sdk\Check\ProductCollectionProvider.cs (1)
23throw new GracefulException(string.Format(CliCommandStrings.ReleasesLibraryFailed, e.Message));
Commands\Sdk\Check\SdkCheckCommand.cs (2)
72throw new GracefulException([CliCommandStrings.RuntimePropertyNotFound], [], isUserError: false); 75throw new GracefulException([CliCommandStrings.HostFxrCouldNotBeLoaded], [hostFxrNotFoundException.Message], isUserError: false);
Commands\Solution\Add\SolutionAddCommand.cs (3)
58throw new GracefulException(CliStrings.SpecifyAtLeastOneProjectToAdd); 207throw new GracefulException(string.Format(CliStrings.SolutionFolderAlreadyContainsProjectWithFilename, rootFolder.Name, projectFileName)); 288throw new GracefulException(CliCommandStrings.SolutionFilterDoesNotSupportFolderOptions);
Commands\Solution\List\SolutionListCommand.cs (1)
34throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message);
Commands\Solution\Migrate\SolutionMigrateCommand.cs (2)
31throw new GracefulException(CliCommandStrings.CannotMigrateSlnx); 41throw new GracefulException(ex.Message, ex);
Commands\Solution\Remove\SolutionRemoveCommand.cs (3)
33throw new GracefulException(CliStrings.SpecifyAtLeastOneProjectToRemove); 61throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message); 63throw new GracefulException(ex.Message, ex);
Commands\Solution\SolutionArgumentValidator.cs (3)
24throw new GracefulException(message); 32throw new GracefulException(CliCommandStrings.SolutionFolderAndInRootMutuallyExclusive); 54throw new GracefulException(
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (7)
31throw new GracefulException(CliCommandStrings.CmdListDevicesAndListTestsMutuallyExclusive); 39throw new GracefulException(CliCommandStrings.CmdDeviceOptionsRequireProject); 237throw new GracefulException(CliCommandStrings.CmdTestNoTestProjectsFound); 242throw new GracefulException(CliCommandStrings.TestCommandUseProject); 275throw new GracefulException( 306throw new GracefulException(CliCommandStrings.CmdTestNoTestProjectsFound); 313throw new GracefulException(CliCommandStrings.TestCommandUseProject);
Commands\Test\MTP\MSBuildUtility.cs (5)
247throw new GracefulException(CliCommandStrings.CmdMultipleBuildPathOptionsErrorDescription); 297throw new GracefulException(CliCommandStrings.TestCommandUseSolution); 314throw new GracefulException(CliCommandStrings.TestCommandUseProject); 329throw new GracefulException(CliCommandStrings.TestCommandUseTestModules); 342throw new GracefulException(CliCommandStrings.TestCommandUseDirectoryWithSwitch);
Commands\Test\MTP\SolutionAndProjectUtility.cs (4)
525throw new GracefulException( 568throw new GracefulException( 625throw new GracefulException(CliCommandStrings.RunCommandDeployFailed); 630throw new GracefulException(CliCommandStrings.RunCommandEvaluationExceptionBuildFailed, s_computeRunArgumentsTarget[0]);
Commands\Test\MTP\ValidationUtility.cs (2)
32throw new GracefulException(CliCommandStrings.CmdMultipleBuildPathOptionsErrorDescription); 51throw new GracefulException(CliCommandStrings.CmdOptionCannotBeUsedWithTestModulesDescription);
Commands\Tool\Common\ToolManifestFinderExtensions.cs (1)
32throw new GracefulException([e.Message, CliCommandStrings.ToolCommonNoManifestGuide], verboseMessages: [e.VerboseMessage], isUserError: false);
Commands\Tool\Install\ToolInstallCommand.cs (1)
49throw new GracefulException(
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (6)
178throw new GracefulException(string.Format(CliCommandStrings.ToolInstallNuGetConfigurationFileDoesNotExist, Path.GetFullPath(_configFilePath))); 291throw new GracefulException( 305throw new GracefulException( 327throw new GracefulException( 349throw new GracefulException( 375throw new GracefulException(messages:
Commands\Tool\Install\ToolInstallLocalCommand.cs (1)
140throw new GracefulException(
Commands\Tool\Install\ToolInstallLocalInstaller.cs (2)
30throw new GracefulException( 67throw new GracefulException(
Commands\Tool\Install\VersionRangeUtilities.cs (3)
19throw new GracefulException(CliStrings.PackageIdentityArgumentVersionOptionConflict); 34throw new GracefulException( 51throw new GracefulException(
Commands\Tool\List\ToolListGlobalOrToolPathCommand.cs (1)
42throw new GracefulException(
Commands\Tool\Run\ToolRunCommand.cs (1)
46throw new GracefulException([string.Format(CliCommandStrings.CannotFindCommandName, toolCommandName)], isUserError: false);
Commands\Tool\Search\ToolSearchCommand.cs (1)
59throw new GracefulException(
Commands\Tool\Store\StoreCommand.cs (1)
37throw new GracefulException(CliCommandStrings.SpecifyManifests);
Commands\Tool\ToolCommandSpecCreator.cs (1)
27throw new GracefulException(string.Format(CliStrings.ToolSettingsUnsupportedRunner, toolName, toolRunner));
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (4)
40throw new GracefulException( 60throw new GracefulException(messages: [string.Format(CliCommandStrings.ToolUninstallToolNotInstalled, packageId)], isUserError: false); 65throw new GracefulException(messages: [string.Format(CliCommandStrings.ToolUninstallToolHasMultipleVersionsInstalled, packageId)], isUserError: false); 86throw new GracefulException(
Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
48throw new GracefulException([string.Format(CliCommandStrings.NoManifestFileContainPackageId, _packageId)], isUserError: false);
Commands\Tool\Update\ToolUpdateCommand.cs (3)
77throw new GracefulException(message); 86throw new GracefulException(CliStrings.PackageIdentityArgumentVersionOptionConflict); 107throw new GracefulException(
Commands\Workload\Clean\WorkloadCleanCommand.cs (1)
36throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported);
Commands\Workload\Elevate\WorkloadElevateCommand.cs (1)
20throw new GracefulException(CliCommandStrings.RequiresWindows, isUserError: false);
Commands\Workload\Install\WorkloadInstallCommand.cs (7)
66throw new GracefulException(CliCommandStrings.CannotSpecifyVersionAndWorkloadIdsByComponent, isUserError: true); 118throw new GracefulException(string.Format(exceptionMessage, workloadId), isUserError: false); 163throw new GracefulException(string.Format(CliCommandStrings.WorkloadInstallWorkloadCacheDownloadFailed, e.Message), e, isUserError: false); 168throw new GracefulException(string.Format(CliCommandStrings.CannotCombineSkipManifestAndRollback, 175throw new GracefulException(string.Format(CliCommandStrings.CannotCombineSkipManifestAndVersion, 182throw new GracefulException(string.Format(CliCommandStrings.CannotUseSkipManifestWithGlobalJsonWorkloadVersion, 212throw new GracefulException(string.Format(CliCommandStrings.WorkloadInstallationFailed, e.Message), e, isUserError: false);
Commands\Workload\Install\WorkloadInstallerFactory.cs (1)
60throw new GracefulException(CliCommandStrings.InadequatePermissions, isUserError: false);
Commands\Workload\InstallingWorkloadCommand.cs (8)
65throw new GracefulException(CliCommandStrings.NoWorkloadHistoryRecords, isUserError: true); 72throw new GracefulException(CliCommandStrings.WorkloadHistoryRecordInvalidIdValue, isUserError: true); 118throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported); 141throw new GracefulException(string.Format(CliCommandStrings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, _globalJsonPath), isUserError: true); 145throw new GracefulException(string.Format(CliCommandStrings.CannotCombineOptions, 151throw new GracefulException(string.Format(CliCommandStrings.CannotCombineOptions, 157throw new GracefulException(CliCommandStrings.SpecifiedWorkloadVersionAndSpecificNonWorkloadVersion, isUserError: true); 161throw new GracefulException(CliCommandStrings.SpecifiedNoWorkloadVersionAndSpecificWorkloadVersion, isUserError: true);
Commands\Workload\Repair\WorkloadRepairCommand.cs (2)
44throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported); 96throw new GracefulException(string.Format(CliCommandStrings.WorkloadRepairFailed, e.Message), e, isUserError: false);
Commands\Workload\Restore\WorkloadRestoreCommand.cs (2)
98throw new GracefulException( 143throw new GracefulException(
Commands\Workload\Search\WorkloadSearchCommand.cs (1)
29throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported);
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (1)
44throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported);
Commands\Workload\Uninstall\WorkloadUninstallCommand.cs (2)
39throw new GracefulException(CliCommandStrings.SdkVersionOptionNotSupported); 88throw new GracefulException(string.Format(CliCommandStrings.WorkloadUninstallFailed, e.Message), e, isUserError: false);
Commands\Workload\Update\WorkloadUpdateCommand.cs (2)
88throw new GracefulException(string.Format(CliCommandStrings.WorkloadUpdateWorkloadCacheDownloadFailed, e.Message), e, isUserError: false); 139throw new GracefulException(string.Format(CliCommandStrings.WorkloadUpdateFailed, e.Message), e, isUserError: false);
MsbuildProject.cs (5)
30: throw new GracefulException(error); 72throw new GracefulException(CliStrings.ProjectDoesNotExist, projectPath); 78throw new GracefulException(CliStrings.ProjectIsInvalid, projectPath); 91throw new GracefulException(CliStrings.FoundInvalidProject, projectFilePath); 222throw new GracefulException(string.Format(
ReleasePropertyProjectLocator.cs (1)
197throw new GracefulException(Strings.SolutionProjectConfigurationsConflict, propertyToCheck, string.Join("\n", (configuredProjects).Select(x => x.FullPath)));
ShellShim\ShellShimTemplateFinder.cs (1)
50throw new GracefulException(string.Format(CliStrings.InvalidRuntimeIdentifier, rid, string.Join(" ", validRids)));
SlnFileFactory.cs (7)
26throw new GracefulException(CliStrings.CouldNotFindSolutionOrDirectory); 37throw new GracefulException( 43throw new GracefulException( 49throw new GracefulException( 80throw new GracefulException( 111throw new GracefulException( 134.Select(path => originalSolution.FindProject(path) ?? throw new GracefulException(
ToolPackage\ToolPackageInstance.cs (1)
215throw new GracefulException($"{errorMessage} {suggestion}", isUserError: false);
dotnet-aot (27)
src\sdk\src\Cli\dotnet\CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (2)
88throw new GracefulException(string.Format(CliStrings.NeedRunToolRestore, 97throw new GracefulException(string.Format(CliStrings.NeedRunToolRestore,
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\ProductCollectionProvider.cs (1)
23throw new GracefulException(string.Format(CliCommandStrings.ReleasesLibraryFailed, e.Message));
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\SdkCheckCommand.cs (2)
72throw new GracefulException([CliCommandStrings.RuntimePropertyNotFound], [], isUserError: false); 75throw new GracefulException([CliCommandStrings.HostFxrCouldNotBeLoaded], [hostFxrNotFoundException.Message], isUserError: false);
src\sdk\src\Cli\dotnet\Commands\Solution\List\SolutionListCommand.cs (1)
34throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message);
src\sdk\src\Cli\dotnet\Commands\Solution\Migrate\SolutionMigrateCommand.cs (2)
31throw new GracefulException(CliCommandStrings.CannotMigrateSlnx); 41throw new GracefulException(ex.Message, ex);
src\sdk\src\Cli\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (3)
33throw new GracefulException(CliStrings.SpecifyAtLeastOneProjectToRemove); 61throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message); 63throw new GracefulException(ex.Message, ex);
src\sdk\src\Cli\dotnet\Commands\Solution\SolutionArgumentValidator.cs (3)
24throw new GracefulException(message); 32throw new GracefulException(CliCommandStrings.SolutionFolderAndInRootMutuallyExclusive); 54throw new GracefulException(
src\sdk\src\Cli\dotnet\Commands\Tool\Common\ToolManifestFinderExtensions.cs (1)
32throw new GracefulException([e.Message, CliCommandStrings.ToolCommonNoManifestGuide], verboseMessages: [e.VerboseMessage], isUserError: false);
src\sdk\src\Cli\dotnet\Commands\Tool\Run\ToolRunCommand.cs (1)
46throw new GracefulException([string.Format(CliCommandStrings.CannotFindCommandName, toolCommandName)], isUserError: false);
src\sdk\src\Cli\dotnet\Commands\Tool\Search\ToolSearchCommand.cs (1)
59throw new GracefulException(
src\sdk\src\Cli\dotnet\Commands\Tool\ToolCommandSpecCreator.cs (1)
27throw new GracefulException(string.Format(CliStrings.ToolSettingsUnsupportedRunner, toolName, toolRunner));
src\sdk\src\Cli\dotnet\Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
48throw new GracefulException([string.Format(CliCommandStrings.NoManifestFileContainPackageId, _packageId)], isUserError: false);
src\sdk\src\Cli\dotnet\MsbuildProject.cs (1)
30: throw new GracefulException(error);
src\sdk\src\Cli\dotnet\SlnFileFactory.cs (7)
26throw new GracefulException(CliStrings.CouldNotFindSolutionOrDirectory); 37throw new GracefulException( 43throw new GracefulException( 49throw new GracefulException( 80throw new GracefulException( 111throw new GracefulException( 134.Select(path => originalSolution.FindProject(path) ?? throw new GracefulException(
Microsoft.DotNet.Cli.Definitions (9)
Commands\Package\PackageListCommandDefinition.cs (1)
140throw new Utils.GracefulException(CommandDefinitionStrings.OptionsCannotBeCombined);
Commands\Tool\ToolLocationOptions.cs (2)
49throw new GracefulException( 61throw new GracefulException(
Common\CommonArguments.cs (2)
46throw new GracefulException(CommandDefinitionStrings.PackageIdentityArgumentIdOrVersionIsNull); 56throw new GracefulException(string.Format(CommandDefinitionStrings.InvalidVersion, versionString));
Common\CommonOptions.cs (1)
369throw new GracefulException(CommandDefinitionStrings.SelfContainAndNoSelfContainedConflict);
Common\TargetPlatformOptions.cs (3)
69throw new GracefulException(CommandDefinitionStrings.CannotSpecifyBothRuntimeAndArchOptions); 85throw new GracefulException(CommandDefinitionStrings.CannotSpecifyBothRuntimeAndOsOptions); 123throw new GracefulException(CommandDefinitionStrings.CannotResolveRuntimeIdentifier);
Microsoft.DotNet.Cli.Utils (2)
Extensions\LockFileFormatExtensions.cs (1)
19throw new GracefulException(string.Join(
PathUtility.cs (1)
356throw new GracefulException(
10 references to GracefulException
dotnet (8)
Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
57catch (Exception ex) when (ex is not GracefulException)
Commands\Test\MTP\MSBuildUtility.cs (3)
454var gracefulExceptions = new ConcurrentQueue<GracefulException>(); 470catch (GracefulException ex) 476if (gracefulExceptions.TryDequeue(out GracefulException? gracefulException))
Commands\Workload\WorkloadUtilities.cs (2)
71/// <see cref="GracefulException"/>. The global policy cannot be overridden by a command-line flag.</item> 80/// <exception cref="GracefulException">
Parser.cs (1)
366if (exception is GracefulException)
ReleasePropertyProjectLocator.cs (1)
150catch (GracefulException)
dotnet-aot (2)
src\sdk\src\Cli\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
57catch (Exception ex) when (ex is not GracefulException)
src\sdk\src\Cli\dotnet\Parser.cs (1)
366if (exception is GracefulException)