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
- String.cs
- SByte.cs
- FormsAuthenticationModule.cs
- InkCanvasFeedbackAdorner.cs
- XmlAttributes.cs
- ComplexType.cs
- ScriptIgnoreAttribute.cs
- EventBuilder.cs
- RemoteWebConfigurationHostStream.cs
- JavaScriptSerializer.cs
- DrawingAttributes.cs
- ValuePatternIdentifiers.cs
- ExpandSegmentCollection.cs
- InternalConfigEventArgs.cs
- GcHandle.cs
- ParseHttpDate.cs
- KeyValueSerializer.cs
- FileSystemEnumerable.cs
- IndentedWriter.cs
- XmlTextReader.cs
- ApplicationServiceManager.cs
- CachedBitmap.cs
- CustomCredentialPolicy.cs
- CodeBinaryOperatorExpression.cs
- SafeCertificateContext.cs
- ISAPIWorkerRequest.cs
- FlowDocumentView.cs
- TypeSystem.cs
- OdbcConnectionFactory.cs
- String.cs
- TreeIterator.cs
- ZoomPercentageConverter.cs
- SortFieldComparer.cs
- ExpandSegmentCollection.cs
- Model3DGroup.cs
- DbModificationClause.cs
- documentsequencetextcontainer.cs
- DataChangedEventManager.cs
- SafeIUnknown.cs
- SystemColorTracker.cs
- XPathItem.cs
- SourceLineInfo.cs
- DateTimeFormatInfoScanner.cs
- ClientTargetCollection.cs
- ScriptRegistrationManager.cs
- OleDbPropertySetGuid.cs
- CurrentChangingEventArgs.cs
- NavigationHelper.cs
- TextLineResult.cs
- Globals.cs
- ButtonBase.cs
- _UriSyntax.cs
- ToolStripDropDownClosedEventArgs.cs
- IdentifierElement.cs
- CachedPathData.cs
- WindowsGraphics.cs
- DataContractSet.cs
- FileVersionInfo.cs
- SchemaObjectWriter.cs
- DataGridItem.cs
- RepeaterItem.cs
- HandleDictionary.cs
- ActiveXContainer.cs
- ConnectionsZone.cs
- FixedPage.cs
- CompoundFileDeflateTransform.cs
- RegisteredExpandoAttribute.cs
- SR.cs
- PrintingPermissionAttribute.cs
- DataGridViewRowsRemovedEventArgs.cs
- RSAProtectedConfigurationProvider.cs
- MeasureItemEvent.cs
- MemoryStream.cs
- CaseExpr.cs
- LabelLiteral.cs
- IpcPort.cs
- ManifestBasedResourceGroveler.cs
- EventLogger.cs
- TextDecoration.cs
- SQLResource.cs
- SmtpClient.cs
- AffineTransform3D.cs
- MarginsConverter.cs
- TextTreeUndoUnit.cs
- HttpBrowserCapabilitiesBase.cs
- BamlReader.cs
- DocumentApplicationJournalEntry.cs
- EdmProviderManifest.cs
- HMACSHA1.cs
- DiagnosticsConfigurationHandler.cs
- ConditionedDesigner.cs
- WindowsMenu.cs
- SafeFindHandle.cs
- DropDownButton.cs
- RadioButtonStandardAdapter.cs
- ManagementDateTime.cs
- UnsafeNativeMethods.cs
- Canvas.cs
- ObjectDisposedException.cs
- BitmapMetadata.cs