Code:
/ FX-1434 / FX-1434 / 1.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
- UnsafeNativeMethods.cs
- RijndaelManaged.cs
- SystemInformation.cs
- WebPartTransformerAttribute.cs
- autovalidator.cs
- MobileControlBuilder.cs
- PartitionResolver.cs
- CellTreeNode.cs
- RegexCompilationInfo.cs
- dataobject.cs
- cookiecollection.cs
- FixedHyperLink.cs
- LinqDataSourceHelper.cs
- PrivacyNoticeBindingElement.cs
- ConfigurationPropertyAttribute.cs
- SimpleRecyclingCache.cs
- SqlDependencyListener.cs
- CodeCatchClause.cs
- PageParserFilter.cs
- ChildTable.cs
- AliasGenerator.cs
- TypeUtils.cs
- Duration.cs
- DoubleAnimationClockResource.cs
- httpstaticobjectscollection.cs
- HttpException.cs
- VBIdentifierDesigner.xaml.cs
- CompilerInfo.cs
- SourceLineInfo.cs
- FieldMetadata.cs
- UpDownBase.cs
- Polyline.cs
- ServiceMoniker.cs
- AuthenticateEventArgs.cs
- Trace.cs
- LoginUtil.cs
- AmbientLight.cs
- DurableServiceAttribute.cs
- UserPreferenceChangingEventArgs.cs
- GlobalItem.cs
- Int16KeyFrameCollection.cs
- Transform3DCollection.cs
- CommonProperties.cs
- Decoder.cs
- NameValueCache.cs
- WindowsIdentity.cs
- processwaithandle.cs
- HierarchicalDataBoundControl.cs
- ScopelessEnumAttribute.cs
- ItemChangedEventArgs.cs
- QuaternionAnimation.cs
- DrawTreeNodeEventArgs.cs
- DockingAttribute.cs
- DependencyObjectType.cs
- ParseHttpDate.cs
- PolyBezierSegment.cs
- ColorBuilder.cs
- Panel.cs
- ToolStripContentPanelDesigner.cs
- HtmlInputSubmit.cs
- BindableAttribute.cs
- KeyNotFoundException.cs
- XmlSchemaAll.cs
- XmlDataDocument.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ForeignKeyConstraint.cs
- Crc32Helper.cs
- WebPartDisplayMode.cs
- DataBoundLiteralControl.cs
- ExpressionBuilder.cs
- CodeGroup.cs
- SourceLocationProvider.cs
- StringFreezingAttribute.cs
- SystemMulticastIPAddressInformation.cs
- QilTypeChecker.cs
- ListViewInsertEventArgs.cs
- FtpWebRequest.cs
- SqlUDTStorage.cs
- SqlUserDefinedTypeAttribute.cs
- MergeFailedEvent.cs
- SqlCharStream.cs
- GridViewDesigner.cs
- HttpRequest.cs
- ArrangedElement.cs
- ColumnMapCopier.cs
- CopyOnWriteList.cs
- SpeakProgressEventArgs.cs
- RemoveStoryboard.cs
- SystemBrushes.cs
- LambdaReference.cs
- SpellerStatusTable.cs
- SqlNode.cs
- HierarchicalDataSourceConverter.cs
- PreviewKeyDownEventArgs.cs
- DurableOperationContext.cs
- BordersPage.cs
- IDReferencePropertyAttribute.cs
- VBIdentifierNameEditor.cs
- QueryExtender.cs
- ProcessModuleCollection.cs