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
- PointCollectionConverter.cs
- RectangleHotSpot.cs
- QilReference.cs
- DropDownList.cs
- OdbcError.cs
- DefaultValueTypeConverter.cs
- DataGridViewButtonColumn.cs
- Point4DConverter.cs
- PtsCache.cs
- InfoCardBaseException.cs
- LoginViewDesigner.cs
- CopyCodeAction.cs
- UriTemplateHelpers.cs
- IncomingWebRequestContext.cs
- HtmlValidationSummaryAdapter.cs
- ColumnHeader.cs
- KeyValueSerializer.cs
- MachineKeyConverter.cs
- ResponseStream.cs
- RecipientInfo.cs
- _ConnectionGroup.cs
- RegexRunnerFactory.cs
- FontInfo.cs
- QilNode.cs
- WpfKnownTypeInvoker.cs
- DefaultAuthorizationContext.cs
- WaitHandleCannotBeOpenedException.cs
- TypeInitializationException.cs
- SqlXmlStorage.cs
- XmlSchemaCollection.cs
- BuilderInfo.cs
- Ipv6Element.cs
- ListViewAutomationPeer.cs
- TrackingQueryElement.cs
- TaiwanCalendar.cs
- HtmlInputCheckBox.cs
- EventData.cs
- XMLSyntaxException.cs
- WindowsIdentity.cs
- ObfuscateAssemblyAttribute.cs
- SqlLiftWhereClauses.cs
- SystemIcmpV6Statistics.cs
- PrePostDescendentsWalker.cs
- TemplateNameScope.cs
- TitleStyle.cs
- ShowExpandedMultiValueConverter.cs
- recordstatefactory.cs
- XmlSchemaElement.cs
- StringUtil.cs
- PropertyStore.cs
- StringDictionary.cs
- FixedPageAutomationPeer.cs
- FixedTextPointer.cs
- ColumnWidthChangingEvent.cs
- LineBreakRecord.cs
- FilterableAttribute.cs
- CommonXSendMessage.cs
- AssemblyNameProxy.cs
- TextTreeInsertElementUndoUnit.cs
- Annotation.cs
- InputLanguageProfileNotifySink.cs
- MeasureData.cs
- EntityParameter.cs
- InteropExecutor.cs
- DataGridViewAccessibleObject.cs
- FileDialog_Vista.cs
- SwitchAttribute.cs
- HttpRequestCacheValidator.cs
- SqlFlattener.cs
- ToolBar.cs
- SecurityDocument.cs
- PrimitiveDataContract.cs
- NewExpression.cs
- SmtpSection.cs
- WinEventWrap.cs
- FontSizeConverter.cs
- CheckBoxStandardAdapter.cs
- XmlSchemaComplexContentExtension.cs
- XdrBuilder.cs
- WebPartZoneCollection.cs
- PowerModeChangedEventArgs.cs
- SqlConnectionManager.cs
- XmlSchemaCollection.cs
- XmlSchema.cs
- SoapFault.cs
- HtmlInputHidden.cs
- CalendarKeyboardHelper.cs
- CachedCompositeFamily.cs
- _IPv6Address.cs
- ThreadPool.cs
- ErrorWebPart.cs
- DbConnectionStringCommon.cs
- ConfigXmlCDataSection.cs
- Itemizer.cs
- OleDbReferenceCollection.cs
- BitmapMetadata.cs
- WmlControlAdapter.cs
- basevalidator.cs
- SqlInfoMessageEvent.cs
- TwoPhaseCommitProxy.cs