Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertyCollection.cs
- SpellerError.cs
- UIElement3D.cs
- IntermediatePolicyValidator.cs
- ValueType.cs
- CompilerErrorCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DynamicPropertyHolder.cs
- OperandQuery.cs
- PathParser.cs
- BamlBinaryReader.cs
- AutoSizeComboBox.cs
- DBConnectionString.cs
- Terminate.cs
- RoutedCommand.cs
- VerificationAttribute.cs
- TimerElapsedEvenArgs.cs
- SafeTimerHandle.cs
- PropertyGrid.cs
- CultureNotFoundException.cs
- FtpWebResponse.cs
- TextureBrush.cs
- ProfileGroupSettingsCollection.cs
- DebugInfoExpression.cs
- BitmapEffectrendercontext.cs
- ProfileGroupSettings.cs
- BindingExpression.cs
- CryptographicAttribute.cs
- WindowsToolbarAsMenu.cs
- XmlSchemaAnnotated.cs
- TableAdapterManagerHelper.cs
- XmlWriterSettings.cs
- GridViewColumn.cs
- DataGridLinkButton.cs
- WeakHashtable.cs
- DataGrid.cs
- AccessDataSource.cs
- DataGridTableCollection.cs
- AuthenticatedStream.cs
- SapiGrammar.cs
- CqlQuery.cs
- COAUTHINFO.cs
- InstanceHandle.cs
- Native.cs
- cookiecollection.cs
- DataMisalignedException.cs
- OrderPreservingSpoolingTask.cs
- WindowsGraphics.cs
- SecurityTokenResolver.cs
- InitializerFacet.cs
- Validator.cs
- GeneralTransformGroup.cs
- MaskedTextBoxDesigner.cs
- QualifiedCellIdBoolean.cs
- CacheEntry.cs
- CommonServiceBehaviorElement.cs
- CdpEqualityComparer.cs
- DataServiceExpressionVisitor.cs
- Color.cs
- OdbcRowUpdatingEvent.cs
- ReferencedType.cs
- ChangeTracker.cs
- WindowsRebar.cs
- TreeNodeCollection.cs
- IconConverter.cs
- WeakReference.cs
- HttpModule.cs
- PrimitiveCodeDomSerializer.cs
- MemoryMappedView.cs
- HtmlHead.cs
- IPCCacheManager.cs
- XmlSchemaAttributeGroup.cs
- WmlTextViewAdapter.cs
- AlignmentXValidation.cs
- Model3DGroup.cs
- XmlSubtreeReader.cs
- AsymmetricSignatureFormatter.cs
- Vector3DCollection.cs
- SerialPinChanges.cs
- ListViewHitTestInfo.cs
- HtmlWindowCollection.cs
- OdbcEnvironmentHandle.cs
- SecurityState.cs
- BindingUtils.cs
- SequentialUshortCollection.cs
- JoinTreeSlot.cs
- BasicHttpMessageSecurityElement.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- XpsS0ValidatingLoader.cs
- TypeListConverter.cs
- CodeActivityMetadata.cs
- SqlPersonalizationProvider.cs
- DCSafeHandle.cs
- DataObjectFieldAttribute.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- Point4DValueSerializer.cs
- DetailsViewDesigner.cs
- ComplexObject.cs
- HealthMonitoringSectionHelper.cs
- ComboBoxRenderer.cs