Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / IO / IOException.cs / 1 / IOException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: IOException ** ** ** Purpose: Exception for a generic IO error. ** ** ===========================================================*/ using System; using System.Runtime.Serialization; namespace System.IO { [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public class IOException : SystemException { // For debugging purposes, store the complete path in the IOException // if possible. Don't give it back to users due to security concerns. // Let the code that throws the exception worry about that. But we can // at least assist people attached to the process with a managed // debugger. Don't serialize it to avoid any security problems. // This information isn't guaranteed to be correct, but is our second // best effort at a file or directory involved, after the exception // message. [NonSerialized] private String _maybeFullPath; // For debuggers on partial trust code public IOException() : base(Environment.GetResourceString("Arg_IOException")) { SetErrorCode(__HResults.COR_E_IO); } public IOException(String message) : base(message) { SetErrorCode(__HResults.COR_E_IO); } public IOException(String message, int hresult) : base(message) { SetErrorCode(hresult); } // Adding this for debuggers when looking at exceptions in partial // trust code that may not have interesting path information in // the exception message. internal IOException(String message, int hresult, String maybeFullPath) : base(message) { SetErrorCode(hresult); _maybeFullPath = maybeFullPath; } public IOException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_IO); } protected IOException(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: IOException ** ** ** Purpose: Exception for a generic IO error. ** ** ===========================================================*/ using System; using System.Runtime.Serialization; namespace System.IO { [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public class IOException : SystemException { // For debugging purposes, store the complete path in the IOException // if possible. Don't give it back to users due to security concerns. // Let the code that throws the exception worry about that. But we can // at least assist people attached to the process with a managed // debugger. Don't serialize it to avoid any security problems. // This information isn't guaranteed to be correct, but is our second // best effort at a file or directory involved, after the exception // message. [NonSerialized] private String _maybeFullPath; // For debuggers on partial trust code public IOException() : base(Environment.GetResourceString("Arg_IOException")) { SetErrorCode(__HResults.COR_E_IO); } public IOException(String message) : base(message) { SetErrorCode(__HResults.COR_E_IO); } public IOException(String message, int hresult) : base(message) { SetErrorCode(hresult); } // Adding this for debuggers when looking at exceptions in partial // trust code that may not have interesting path information in // the exception message. internal IOException(String message, int hresult, String maybeFullPath) : base(message) { SetErrorCode(hresult); _maybeFullPath = maybeFullPath; } public IOException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_IO); } protected IOException(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
- HtmlSelectionListAdapter.cs
- RbTree.cs
- InvokeWebService.cs
- SetStateDesigner.cs
- PeerCollaboration.cs
- DataBoundControlActionList.cs
- IndexerHelper.cs
- CodeIdentifiers.cs
- serverconfig.cs
- DateTimeConverter.cs
- ObjectPersistData.cs
- SigningDialog.cs
- SecurityPolicySection.cs
- Renderer.cs
- ApplicationContext.cs
- XamlStream.cs
- ImmutableObjectAttribute.cs
- MembershipPasswordException.cs
- QilTernary.cs
- DetailsViewRowCollection.cs
- SymLanguageType.cs
- DesignerSelectionListAdapter.cs
- ConfigurationStrings.cs
- QilUnary.cs
- DirectoryInfo.cs
- AssemblyBuilder.cs
- BindingCompleteEventArgs.cs
- ResourceBinder.cs
- EventLogger.cs
- ServicesSection.cs
- ProfileBuildProvider.cs
- TextTreeObjectNode.cs
- ProxyManager.cs
- ClientSponsor.cs
- HandledMouseEvent.cs
- MultiPropertyDescriptorGridEntry.cs
- ProfileGroupSettingsCollection.cs
- BasicViewGenerator.cs
- ClientSettingsStore.cs
- CodeActivityMetadata.cs
- NullableDecimalMinMaxAggregationOperator.cs
- RealizedColumnsBlock.cs
- RayMeshGeometry3DHitTestResult.cs
- unsafeIndexingFilterStream.cs
- FocusChangedEventArgs.cs
- ArrangedElement.cs
- Operators.cs
- PowerStatus.cs
- DataBindingHandlerAttribute.cs
- MarshalDirectiveException.cs
- AdRotator.cs
- HMACSHA384.cs
- VirtualPathProvider.cs
- HwndSourceKeyboardInputSite.cs
- SqlXml.cs
- WebPartTransformerCollection.cs
- UrlAuthFailureHandler.cs
- ManualResetEvent.cs
- TableRowCollection.cs
- ServiceHostingEnvironment.cs
- SecurityDocument.cs
- MarkupWriter.cs
- CfgRule.cs
- ArgIterator.cs
- Set.cs
- PageContent.cs
- TransactionException.cs
- CornerRadiusConverter.cs
- BindValidator.cs
- PeerApplication.cs
- CompilerGlobalScopeAttribute.cs
- SQLInt32Storage.cs
- Serializer.cs
- OdbcTransaction.cs
- Misc.cs
- FontStretchConverter.cs
- basecomparevalidator.cs
- BuildProvidersCompiler.cs
- MenuItemBindingCollection.cs
- DbConnectionClosed.cs
- DataRecordInternal.cs
- InvariantComparer.cs
- Point3DCollectionConverter.cs
- ParserStreamGeometryContext.cs
- ImageClickEventArgs.cs
- HyperlinkAutomationPeer.cs
- WindowCollection.cs
- QueryContinueDragEvent.cs
- HttpModuleCollection.cs
- MaskInputRejectedEventArgs.cs
- WebBrowsableAttribute.cs
- RadioButton.cs
- ValueChangedEventManager.cs
- TypeToken.cs
- TransformationRules.cs
- HyperLink.cs
- ReadOnlyTernaryTree.cs
- ListViewUpdateEventArgs.cs
- OpCellTreeNode.cs
- XmlSchemaInfo.cs