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
- ComplexLine.cs
- SoapMessage.cs
- DuplicateContext.cs
- SubclassTypeValidator.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- DataGridViewCellStyleBuilderDialog.cs
- XmlSerializerAssemblyAttribute.cs
- CompositionDesigner.cs
- LongValidator.cs
- AndCondition.cs
- StyleXamlParser.cs
- Trace.cs
- SQLDouble.cs
- Policy.cs
- OAVariantLib.cs
- CompiledXpathExpr.cs
- PropertyToken.cs
- SafeNativeMethods.cs
- ViewDesigner.cs
- ComplexPropertyEntry.cs
- Rectangle.cs
- CollectionDataContractAttribute.cs
- SecurityPolicySection.cs
- EncodingTable.cs
- OptimalTextSource.cs
- NativeMethods.cs
- SqlDataSource.cs
- PnrpPermission.cs
- HashSetDebugView.cs
- ServiceReference.cs
- GatewayDefinition.cs
- ListViewItem.cs
- MenuItem.cs
- CharAnimationUsingKeyFrames.cs
- FixedPage.cs
- EmptyStringExpandableObjectConverter.cs
- ZipIOExtraFieldPaddingElement.cs
- RotateTransform.cs
- TargetException.cs
- SqlDataAdapter.cs
- SpeechDetectedEventArgs.cs
- WeakReferenceEnumerator.cs
- Thread.cs
- cookiecontainer.cs
- Char.cs
- ByteArrayHelperWithString.cs
- CacheVirtualItemsEvent.cs
- ToolStrip.cs
- CreatingCookieEventArgs.cs
- Constraint.cs
- PlatformNotSupportedException.cs
- _ChunkParse.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DocumentSequenceHighlightLayer.cs
- WebBrowserNavigatingEventHandler.cs
- ClientBuildManager.cs
- Int64Converter.cs
- GreenMethods.cs
- ImmutableObjectAttribute.cs
- ResourceReferenceExpressionConverter.cs
- HtmlInputImage.cs
- ExpressionPrinter.cs
- RowUpdatedEventArgs.cs
- ResourcePermissionBaseEntry.cs
- HatchBrush.cs
- GacUtil.cs
- DescendentsWalker.cs
- RowSpanVector.cs
- TreeViewItem.cs
- AccessedThroughPropertyAttribute.cs
- ScrollEventArgs.cs
- DockPatternIdentifiers.cs
- HashAlgorithm.cs
- HttpApplicationFactory.cs
- AutomationPropertyInfo.cs
- ImmComposition.cs
- FixUp.cs
- LassoSelectionBehavior.cs
- WebHttpSecurity.cs
- DbgUtil.cs
- ComponentCollection.cs
- PeerTransportListenAddressValidatorAttribute.cs
- VirtualPath.cs
- LayoutTable.cs
- IndexedGlyphRun.cs
- TextAutomationPeer.cs
- ReachIDocumentPaginatorSerializer.cs
- EastAsianLunisolarCalendar.cs
- SetterBase.cs
- SR.cs
- _FtpDataStream.cs
- ProxyAttribute.cs
- TypeDescriptionProvider.cs
- TextRangeEdit.cs
- MissingMemberException.cs
- MetafileEditor.cs
- SpellerStatusTable.cs
- Debugger.cs
- ServiceInfo.cs
- XmlDictionaryWriter.cs