Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / ApplicationException.cs / 1 / ApplicationException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ApplicationException
**
**
** Purpose: The base class for all "less serious" exceptions that must be
** declared or caught.
**
**
=============================================================================*/
namespace System {
using System.Runtime.Serialization;
// The ApplicationException is the base class for nonfatal,
// application errors that occur. These exceptions are generated
// (i.e., thrown) by an application, not the Runtime. Applications that need
// to create their own exceptions do so by extending this class.
// ApplicationException extends but adds no new functionality to
// RecoverableException.
//
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable()] public class ApplicationException : Exception {
// Creates a new ApplicationException with its message string set to
// the empty string, its HRESULT set to COR_E_APPLICATION,
// and its ExceptionInfo reference set to null.
public ApplicationException()
: base(Environment.GetResourceString("Arg_ApplicationException")) {
SetErrorCode(__HResults.COR_E_APPLICATION);
}
// Creates a new ApplicationException with its message string set to
// message, its HRESULT set to COR_E_APPLICATION,
// and its ExceptionInfo reference set to null.
//
public ApplicationException(String message)
: base(message) {
SetErrorCode(__HResults.COR_E_APPLICATION);
}
public ApplicationException(String message, Exception innerException)
: base(message, innerException) {
SetErrorCode(__HResults.COR_E_APPLICATION);
}
protected ApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XhtmlBasicValidatorAdapter.cs
- ScopelessEnumAttribute.cs
- EllipticalNodeOperations.cs
- ReachBasicContext.cs
- EventLogInformation.cs
- MissingFieldException.cs
- Unit.cs
- Style.cs
- Point3DAnimationBase.cs
- PropertyEntry.cs
- OleDbTransaction.cs
- ConstraintStruct.cs
- ScriptingAuthenticationServiceSection.cs
- PolygonHotSpot.cs
- ADConnectionHelper.cs
- PropertyValue.cs
- SEHException.cs
- ClearTypeHintValidation.cs
- SQLByteStorage.cs
- ReadOnlyNameValueCollection.cs
- DescendentsWalker.cs
- TraceLog.cs
- DesignerLoader.cs
- IpcServerChannel.cs
- FixedPageProcessor.cs
- Bidi.cs
- SessionStateContainer.cs
- PrimitiveCodeDomSerializer.cs
- XmlHierarchyData.cs
- MsmqOutputChannel.cs
- ProcessExitedException.cs
- WeakHashtable.cs
- ItemMap.cs
- Or.cs
- Utils.cs
- Polyline.cs
- ExpressionTextBox.xaml.cs
- WindowsRebar.cs
- GorillaCodec.cs
- OleDbFactory.cs
- Operator.cs
- DataGridItem.cs
- UrlPropertyAttribute.cs
- OLEDB_Enum.cs
- CharAnimationUsingKeyFrames.cs
- ContractMapping.cs
- Soap.cs
- WindowsScroll.cs
- BinaryFormatter.cs
- Operators.cs
- XXXOnTypeBuilderInstantiation.cs
- PropertyItemInternal.cs
- HTTPNotFoundHandler.cs
- NestedContainer.cs
- OdbcException.cs
- RepeatButton.cs
- HttpCookieCollection.cs
- SystemBrushes.cs
- SchemaMapping.cs
- SaveFileDialog.cs
- DesignerSerializationManager.cs
- RegularExpressionValidator.cs
- FreeFormPanel.cs
- ScriptingWebServicesSectionGroup.cs
- CapabilitiesState.cs
- BitmapMetadataEnumerator.cs
- OuterGlowBitmapEffect.cs
- InvokeHandlers.cs
- BinaryNode.cs
- StoragePropertyMapping.cs
- WebPartAddingEventArgs.cs
- DataComponentGenerator.cs
- XmlNodeReader.cs
- NativeMethods.cs
- DbConnectionPoolCounters.cs
- TextUtf8RawTextWriter.cs
- PrimarySelectionGlyph.cs
- PageParser.cs
- Expression.cs
- AppSettingsReader.cs
- CharAnimationUsingKeyFrames.cs
- InternalsVisibleToAttribute.cs
- PlatformNotSupportedException.cs
- StickyNoteContentControl.cs
- DataError.cs
- MDIControlStrip.cs
- WindowsListBox.cs
- _Connection.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ActivationServices.cs
- ProtocolsConfigurationHandler.cs
- MetadataUtil.cs
- columnmapkeybuilder.cs
- HttpHandlerActionCollection.cs
- ValidationErrorEventArgs.cs
- ColumnReorderedEventArgs.cs
- ConfigurationStrings.cs
- ComponentCommands.cs
- Token.cs
- Nodes.cs