9 types derived from ApplicationException
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\ToolRuntimeException.cs (1)
11internal class ToolRuntimeException : ApplicationException
Microsoft.Build.Tasks.Core (1)
AppConfig\AppConfigException.cs (1)
16System.ApplicationException
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmException.cs (1)
23public class DkmException : ApplicationException
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvalidFilterCriteriaException.cs (1)
12public class InvalidFilterCriteriaException : ApplicationException
src\libraries\System.Private.CoreLib\src\System\Reflection\TargetException.cs (1)
12public class TargetException : ApplicationException
src\libraries\System.Private.CoreLib\src\System\Reflection\TargetInvocationException.cs (1)
11public sealed class TargetInvocationException : ApplicationException
src\libraries\System.Private.CoreLib\src\System\Reflection\TargetParameterCountException.cs (1)
11public sealed class TargetParameterCountException : ApplicationException
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandleCannotBeOpenedException.cs (1)
12public class WaitHandleCannotBeOpenedException : ApplicationException
System.Threading (1)
System\Threading\ReaderWriterLock.cs (1)
1129private sealed class ReaderWriterLockApplicationException : ApplicationException
73 instantiations of ApplicationException
Identity.ExternalClaims (34)
Pages\Account\ConfirmEmail.cshtml.cs (2)
34throw new ApplicationException($"Unable to load user with ID '{userId}'."); 40throw new ApplicationException($"Error confirming email for user with ID '{userId}':");
Pages\Account\ExternalLogin.cshtml.cs (1)
117throw new ApplicationException("Error loading external login information during confirmation.");
Pages\Account\LoginWith2fa.cshtml.cs (2)
54throw new ApplicationException($"Unable to load two-factor authentication user."); 73throw new ApplicationException($"Unable to load two-factor authentication user.");
Pages\Account\LoginWithRecoveryCode.cshtml.cs (2)
48throw new ApplicationException($"Unable to load two-factor authentication user."); 66throw new ApplicationException($"Unable to load two-factor authentication user.");
Pages\Account\Manage\ChangePassword.cshtml.cs (2)
63throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 85throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\Disable2fa.cshtml.cs (4)
34throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 39throw new ApplicationException($"Cannot disable 2FA for user with ID '{_userManager.GetUserId(User)}' as it's not currently enabled."); 50throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 56throw new ApplicationException($"Unexpected error occurred disabling 2FA for user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (2)
60throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 78throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\ExternalLogins.cshtml.cs (6)
43throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 59throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 65throw new ApplicationException($"Unexpected error occurred removing external login for user with ID '{user.Id}'."); 89throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 95throw new ApplicationException($"Unexpected error occurred loading external login info for user with ID '{user.Id}'."); 101throw new ApplicationException($"Unexpected error occurred adding external login for user with ID '{user.Id}'.");
Pages\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
36throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 41throw new ApplicationException($"Cannot generate recovery codes for user with ID '{user.Id}' as they do not have 2FA enabled.");
Pages\Account\Manage\Index.cshtml.cs (5)
60throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 86throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 94throw new ApplicationException($"Unexpected error occurred setting email for user with ID '{user.Id}'."); 103throw new ApplicationException($"Unexpected error occurred setting phone number for user with ID '{user.Id}'."); 120throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\ResetAuthenticator.cshtml.cs (2)
33throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 44throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\SetPassword.cshtml.cs (2)
54throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 77throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\Manage\TwoFactorAuthentication.cshtml.cs (1)
44throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
Pages\Account\ResetPassword.cshtml.cs (1)
51throw new ApplicationException("A code must be supplied for password reset.");
illink (3)
Microsoft.AspNetCore.Diagnostics.Tests (3)
ExceptionHandlerTest.cs (3)
588throw new ApplicationException("Something bad happened."); 679innerAppBuilder.Run(_ => throw new ApplicationException("Something bad happened.")); 718innerAppBuilder.Run(_ => throw new ApplicationException("Something bad happened."));
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisHubLifetimeManagerTests.cs (1)
106ConnectionFactory = _ => throw new ApplicationException("throw from connect")
Microsoft.Build.Tasks.Core (6)
ManifestUtil\SecurityUtil.cs (6)
691throw new ApplicationException(resources.GetString("SecurityUtil.OnlyRSACertsAreAllowed")); 748throw new ApplicationException(resources.GetString("SecurityUtil.TimestampUrlNotFound"), ex); 750throw new ApplicationException(ex.Message, ex); 813throw new ApplicationException(String.Format(CultureInfo.InvariantCulture, resources.GetString("SecurityUtil.SigntoolFail"), path, signTool.StandardError.ReadToEnd())); 819throw new ApplicationException(String.Format(CultureInfo.InvariantCulture, resources.GetString("SecurityUtil.SigntoolFail"), path, signTool.StandardError.ReadToEnd())); 879throw new ApplicationException(String.Format(CultureInfo.CurrentCulture,
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PublishArtifactsInManifestBase.cs (1)
655_ => throw new ApplicationException()
Microsoft.DotNet.Build.Tasks.VisualStudio (7)
OptProf\FindLatestDrop.cs (4)
59throw new ApplicationException("No drops matching the specified prefix were returned"); 67throw new ApplicationException($"Invalid timestamp: '{item["CreatedDateUtc"]}'"); 74throw new ApplicationException($"Drop has no name: {item}"); 86throw new ApplicationException($"No complete, undeleted drops found");
OptProf\GetRunSettingsSessionConfiguration.cs (3)
84throw new ApplicationException($"Invalid drop URL: '{dropUrl}'"); 103throw new ApplicationException("Invalid value of vsDropName argument: must start with 'Products/'."); 118throw new ApplicationException($"Unable to read config file '{configPath}': {e.Message}");
Microsoft.DotNet.RemoteExecutor (1)
PasteArguments.cs (1)
41throw new ApplicationException("The argv[0] argument cannot include a double quote.");
Microsoft.ML.Core (1)
Data\Repository.cs (1)
431throw new ApplicationException($"Cannot determine product version from assembly {assembly.FullName}.");
Microsoft.ML.TestFramework (1)
PasteArguments.cs (1)
125throw new ApplicationException("The argv[0] argument cannot include a double quote.");
PresentationBuildTasks (2)
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
53throw new ApplicationException(SR.Format(SR.ResourceTooBig, _sourcePath, System.Int32.MaxValue));
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1356ApplicationException aeAssemblyMissing = new ApplicationException(message);
PresentationFramework (9)
System\Windows\Documents\DocumentReference.cs (2)
272throw new ApplicationException(SR.DocumentReferenceNotFound); 291throw new ApplicationException(SR.DocumentReferenceUnsupportedMimeType);
System\Windows\Documents\DocumentSequence.cs (1)
731throw new ApplicationException(SR.DocumentReferenceHasInvalidDocument);
System\Windows\Documents\FixedDocument.cs (1)
666ApplicationException ae = new ApplicationException(string.Format(System.Globalization.CultureInfo.CurrentCulture, SR.ExceptionInGetPage, index), e);
System\Windows\Documents\PageContent.cs (4)
371throw new ApplicationException(SR.PageContentNotFound); 586throw new ApplicationException(SR.PageContentNotFound); 605throw new ApplicationException(SR.PageContentUnsupportedMimeType); 610throw new ApplicationException(SR.Format(SR.PageContentUnsupportedPageType, o.GetType()));
System\Windows\Markup\BamlMapTable.cs (1)
1624ApplicationException bamlException = new(SR.Format(SR.GetResourceString(id), parameter));
ServerComparison.TestSites (1)
Startup.cs (1)
19throw new ApplicationException("Application exception");
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
654ex = new ApplicationException(ex.Message); 658ex = new ApplicationException();
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
118throw new ApplicationException(SR.Arg_SynchronizationLockException);
27 references to ApplicationException
csc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
266catch (ApplicationException e)
Microsoft.AspNetCore.Diagnostics.Tests (3)
ExceptionHandlerTest.cs (3)
569Assert.IsType<ApplicationException>(exception.InnerException); 672StatusCodeSelector = ex => ex is ApplicationException 711StatusCodeSelector = ex => ex is ApplicationException
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
RedisHubLifetimeManagerTests.cs (2)
116var ex = await Assert.ThrowsAsync<ApplicationException>(() => manager.OnConnectedAsync(connection)).DefaultTimeout();
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
266catch (ApplicationException e)
Microsoft.Build.Tasks.Core (2)
ManifestUtil\SecurityUtil.cs (1)
773catch (ApplicationException) when (timestampUrl != null)
SignFile.cs (1)
72catch (ApplicationException ex)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
77catch (ApplicationException)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GetRunSettingsSessionConfiguration.cs (1)
68catch (ApplicationException e)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (1)
OptProf\FindLatestDropTests.cs (1)
46Assert.Throws<ApplicationException>(() => FindLatestDrop.GetLatestDropName(json));
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
44[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ApplicationException))]
netstandard (1)
netstandard.cs (1)
39[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ApplicationException))]
PresentationBuildTasks (1)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1356ApplicationException aeAssemblyMissing = new ApplicationException(message);
PresentationFramework (4)
System\Windows\Documents\FixedDocument.cs (2)
664if (e is InvalidOperationException || e is ApplicationException) 666ApplicationException ae = new ApplicationException(string.Format(System.Globalization.CultureInfo.CurrentCulture, SR.ExceptionInGetPage, index), e);
System\Windows\Documents\PageContentAsyncResult.cs (1)
160catch (ApplicationException e)
System\Windows\Markup\BamlMapTable.cs (1)
1624ApplicationException bamlException = new(SR.Format(SR.GetResourceString(id), parameter));
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
266catch (ApplicationException e)
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\ApplicationException.cs (3)
14/// You should derive custom exceptions from the <see cref="Exception" /> class rather than the <see cref="ApplicationException" /> class. 15/// You should not throw an <see cref="ApplicationException" /> in your code, and you should not catch an <see cref="ApplicationException" />
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
33[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ApplicationException))]
System.Threading (1)
System\Threading\ReaderWriterLock.cs (1)
1118/// The original code used to throw <see cref="ApplicationException"/> for almost all exception cases, even for
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
266catch (ApplicationException e)
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
266catch (ApplicationException e)