Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / System / data / design / InternalException.cs / 1 / InternalException.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //----------------------------------------------------------------------------- /* */ namespace System.Data.Design { using System; using System.Design; using System.Diagnostics; using System.Runtime.Serialization; [Serializable] internal class InternalException : Exception, ISerializable { private const string internalExceptionMessageID = "ERR_INTERNAL"; private string internalMessage = String.Empty; // showErrorMesageOnReport let you hide the sensitive error msg to the end user. private bool showErrorMesageOnReport; private int errorCode = -1; internal InternalException(string internalMessage) : this(internalMessage, null) {} internal InternalException(string internalMessage, Exception innerException): this(innerException, internalMessage, -1, false) { } internal InternalException(string internalMessage, int errorCode): this(null, internalMessage, errorCode, false) { } internal InternalException(string internalMessage, int errorCode, bool showTextOnReport): this(null, internalMessage, errorCode, showTextOnReport) { } internal InternalException(Exception innerException, string internalMessage, int errorCode, bool showErrorMesageOnReport) : this(innerException, internalMessage, errorCode, showErrorMesageOnReport, true) { } internal InternalException(Exception innerException, string internalMessage, int errorCode, bool showErrorMesageOnReport, bool needAssert) : base(SR.GetString(internalExceptionMessageID), innerException) { this.errorCode = errorCode; this.showErrorMesageOnReport = showErrorMesageOnReport; if (needAssert) { Debug.Fail(internalMessage); } } private InternalException(SerializationInfo info, StreamingContext context) : base(info, context){ internalMessage = info.GetString("InternalMessage"); errorCode = info.GetInt32("ErrorCode"); showErrorMesageOnReport = info.GetBoolean("ShowErrorMesageOnReport"); } void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context){ info.AddValue("InternalMessage", internalMessage); info.AddValue("ErrorCode", errorCode); info.AddValue("ShowErrorMesageOnReport", showErrorMesageOnReport); base.GetObjectData(info, context); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IMembershipProvider.cs
- AutomationFocusChangedEventArgs.cs
- DisplayMemberTemplateSelector.cs
- MLangCodePageEncoding.cs
- IISMapPath.cs
- VBCodeProvider.cs
- RenderDataDrawingContext.cs
- MemoryRecordBuffer.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- State.cs
- _SslSessionsCache.cs
- securestring.cs
- SQLGuidStorage.cs
- WebHttpSecurity.cs
- SecurityTokenProviderContainer.cs
- SqlClientPermission.cs
- WindowsIdentity.cs
- StringExpressionSet.cs
- WebConfigurationHostFileChange.cs
- PropertyGroupDescription.cs
- PersonalizationProviderCollection.cs
- AssemblyBuilder.cs
- InstanceNameConverter.cs
- TimeoutTimer.cs
- WebConfigurationHostFileChange.cs
- CodeVariableReferenceExpression.cs
- StylusPointPropertyId.cs
- WebPartManager.cs
- RuleProcessor.cs
- TdsParserSafeHandles.cs
- XmlObjectSerializerReadContextComplexJson.cs
- TogglePattern.cs
- WebPartConnectionsConfigureVerb.cs
- MetadataArtifactLoaderResource.cs
- UdpChannelListener.cs
- AuthenticationConfig.cs
- DescendentsWalker.cs
- RunInstallerAttribute.cs
- DropDownButton.cs
- TypeDescriptorContext.cs
- securitycriticaldataClass.cs
- IItemContainerGenerator.cs
- LoadedEvent.cs
- StatusBarItem.cs
- SafeRightsManagementHandle.cs
- Model3D.cs
- DbParameterHelper.cs
- GridViewRowEventArgs.cs
- XmlName.cs
- DataGridViewHeaderCell.cs
- Pens.cs
- SqlRetyper.cs
- HandledEventArgs.cs
- DropShadowBitmapEffect.cs
- Image.cs
- XPathNode.cs
- ExtensionQuery.cs
- TemplateColumn.cs
- Icon.cs
- DataGridViewCellStyle.cs
- PerformanceCounter.cs
- XNodeSchemaApplier.cs
- CryptoProvider.cs
- PerformanceCounterManager.cs
- EncryptedPackage.cs
- ClipboardProcessor.cs
- formatter.cs
- AuthorizationSection.cs
- ToolStripKeyboardHandlingService.cs
- Emitter.cs
- ErrorView.xaml.cs
- SocketInformation.cs
- NavigationProperty.cs
- EncoderReplacementFallback.cs
- TemplatePropertyEntry.cs
- Accessible.cs
- OpacityConverter.cs
- InputLanguageCollection.cs
- DataSourceCacheDurationConverter.cs
- Literal.cs
- PageBreakRecord.cs
- ClientSection.cs
- KeyValueSerializer.cs
- Win32SafeHandles.cs
- __ComObject.cs
- OrderedDictionary.cs
- ConditionalDesigner.cs
- HtmlImage.cs
- XmlObjectSerializerWriteContextComplex.cs
- cache.cs
- XmlUTF8TextReader.cs
- ApplicationFileCodeDomTreeGenerator.cs
- CodeMemberProperty.cs
- WebControl.cs
- GZipUtils.cs
- DeflateEmulationStream.cs
- _Semaphore.cs
- DataBoundControlAdapter.cs
- CompilationLock.cs
- XmlSchemaSimpleContent.cs