Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / InteropServices / ExternalException.cs / 1305376 / ExternalException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: ExternalException ** ** ** Purpose: Exception base class for all errors from Interop or Structured ** Exception Handling code. ** ** =============================================================================*/ namespace System.Runtime.InteropServices { using System; using System.Globalization; using System.Runtime.Serialization; // Base exception for COM Interop errors &; Structured Exception Handler // exceptions. // [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ExternalException : SystemException { public ExternalException() : base(Environment.GetResourceString("Arg_ExternalException")) { SetErrorCode(__HResults.E_FAIL); } public ExternalException(String message) : base(message) { SetErrorCode(__HResults.E_FAIL); } public ExternalException(String message, Exception inner) : base(message, inner) { SetErrorCode(__HResults.E_FAIL); } public ExternalException(String message,int errorCode) : base(message) { SetErrorCode(errorCode); } [System.Security.SecuritySafeCritical] // auto-generated protected ExternalException(SerializationInfo info, StreamingContext context) : base(info, context) { } public virtual int ErrorCode { get { return HResult; } } #if !FEATURE_CORECLR // Breaks the subset-of-Orcas property public override String ToString() { String message = Message; String s; String _className = GetType().ToString(); s = _className + " (0x" + HResult.ToString("X8", CultureInfo.InvariantCulture) + ")"; if (!(String.IsNullOrEmpty(message))) { s = s + ": " + message; } Exception _innerException = InnerException; if (_innerException!=null) { s = s + " ---> " + _innerException.ToString(); } if (StackTrace != null) s += Environment.NewLine + StackTrace; return s; } #endif // !FEATURE_CORECLR } } // 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
- UnknownWrapper.cs
- EdmType.cs
- AcceleratedTokenAuthenticator.cs
- SiteMapDataSource.cs
- DataGridCaption.cs
- Binding.cs
- DefaultMemberAttribute.cs
- SwitchAttribute.cs
- ModelUIElement3D.cs
- DisplayToken.cs
- XmlDocumentType.cs
- SharedUtils.cs
- MdImport.cs
- ZoomPercentageConverter.cs
- ColumnMapCopier.cs
- WriteTimeStream.cs
- TimeManager.cs
- DispatcherProcessingDisabled.cs
- EventArgs.cs
- AttributeProviderAttribute.cs
- PasswordBox.cs
- GridEntryCollection.cs
- TableRowGroup.cs
- FillRuleValidation.cs
- GiveFeedbackEventArgs.cs
- NonBatchDirectoryCompiler.cs
- SchemaTableOptionalColumn.cs
- EncoderNLS.cs
- WebPartZoneBase.cs
- ErrorWrapper.cs
- FlowLayoutSettings.cs
- WebServiceClientProxyGenerator.cs
- ImmutableObjectAttribute.cs
- FigureParaClient.cs
- SafeNativeMethods.cs
- _Connection.cs
- Attributes.cs
- CheckBoxList.cs
- RegistrySecurity.cs
- TypeInfo.cs
- TextParentUndoUnit.cs
- MDIControlStrip.cs
- GPPOINT.cs
- UserPreferenceChangingEventArgs.cs
- GraphicsContext.cs
- EventLogSession.cs
- UnsafeNativeMethods.cs
- PeerName.cs
- X509ClientCertificateCredentialsElement.cs
- DbParameterHelper.cs
- TextOptions.cs
- QilTernary.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ActivityStatusChangeEventArgs.cs
- WindowsScroll.cs
- RowBinding.cs
- XmlArrayItemAttributes.cs
- AncestorChangedEventArgs.cs
- TimelineCollection.cs
- DependentList.cs
- RequestCacheManager.cs
- CharKeyFrameCollection.cs
- CodeStatementCollection.cs
- ACL.cs
- TypedOperationInfo.cs
- SafeRegistryHandle.cs
- ReflectionPermission.cs
- XPathBinder.cs
- TransformGroup.cs
- XsdDateTime.cs
- XmlUtf8RawTextWriter.cs
- RotateTransform3D.cs
- XDRSchema.cs
- RawUIStateInputReport.cs
- HttpTransportSecurity.cs
- EvidenceTypeDescriptor.cs
- MemberExpressionHelper.cs
- StyleBamlTreeBuilder.cs
- XmlQueryCardinality.cs
- Quack.cs
- SapiGrammar.cs
- EdmToObjectNamespaceMap.cs
- FixedSOMImage.cs
- ImpersonateTokenRef.cs
- HttpDebugHandler.cs
- WeakReference.cs
- Error.cs
- HuffCodec.cs
- CachingHintValidation.cs
- DetailsViewDeletedEventArgs.cs
- CompilerLocalReference.cs
- NavigationService.cs
- COMException.cs
- ContentPresenter.cs
- VirtualizingStackPanel.cs
- DispatcherBuilder.cs
- TextTrailingWordEllipsis.cs
- MarkupCompiler.cs
- ThicknessAnimationUsingKeyFrames.cs
- ListViewSelectEventArgs.cs