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
- infer.cs
- CustomSignedXml.cs
- columnmapfactory.cs
- GridViewRow.cs
- SafeSecurityHelper.cs
- RTLAwareMessageBox.cs
- ControlParameter.cs
- WindowsTreeView.cs
- GroupDescription.cs
- SoapFault.cs
- SystemSounds.cs
- CodeNamespaceCollection.cs
- ThreadPoolTaskScheduler.cs
- TypeElement.cs
- log.cs
- DetailsViewModeEventArgs.cs
- ClrPerspective.cs
- LogicalTreeHelper.cs
- BooleanExpr.cs
- StorageBasedPackageProperties.cs
- SourceElementsCollection.cs
- SelectionHighlightInfo.cs
- ServiceEndpoint.cs
- RawStylusSystemGestureInputReport.cs
- ColumnTypeConverter.cs
- HttpListenerRequest.cs
- DbModificationCommandTree.cs
- followingquery.cs
- CellConstantDomain.cs
- ECDiffieHellmanCngPublicKey.cs
- CompoundFileIOPermission.cs
- MatrixTransform.cs
- GroupQuery.cs
- OdbcParameterCollection.cs
- AspProxy.cs
- FaultDesigner.cs
- WaitForChangedResult.cs
- OleStrCAMarshaler.cs
- DnsPermission.cs
- FolderLevelBuildProvider.cs
- TextElementCollectionHelper.cs
- SimpleTypeResolver.cs
- PeerNameRecord.cs
- GridItemCollection.cs
- HandlerMappingMemo.cs
- XmlQueryType.cs
- ReadOnlyMetadataCollection.cs
- EventLogTraceListener.cs
- SQLByteStorage.cs
- DefaultValueConverter.cs
- DbDeleteCommandTree.cs
- AutoCompleteStringCollection.cs
- ColorIndependentAnimationStorage.cs
- ValidationPropertyAttribute.cs
- _BaseOverlappedAsyncResult.cs
- Win32Native.cs
- WebPartDisplayMode.cs
- XmlQuerySequence.cs
- XmlDocumentFieldSchema.cs
- BufferedReadStream.cs
- PropertyStore.cs
- WindowsSysHeader.cs
- HandlerFactoryCache.cs
- MemoryMappedViewAccessor.cs
- PersonalizationDictionary.cs
- CodeArrayIndexerExpression.cs
- XmlSchemaSimpleContentRestriction.cs
- TextEndOfParagraph.cs
- TextElementEnumerator.cs
- MulticastOption.cs
- ParsedAttributeCollection.cs
- KeyPressEvent.cs
- ContractUtils.cs
- HttpInputStream.cs
- ComponentEditorForm.cs
- DynamicAttribute.cs
- LateBoundBitmapDecoder.cs
- SmtpDigestAuthenticationModule.cs
- AsymmetricCryptoHandle.cs
- DataServiceStreamResponse.cs
- Thread.cs
- EntityDescriptor.cs
- GeneralTransform3D.cs
- RegexCharClass.cs
- DeploymentSection.cs
- ItemCheckedEvent.cs
- Separator.cs
- ChtmlTextWriter.cs
- MobileControlDesigner.cs
- BaseResourcesBuildProvider.cs
- RegexBoyerMoore.cs
- InvalidOperationException.cs
- DataBindEngine.cs
- ImmutableObjectAttribute.cs
- SqlTransaction.cs
- ILGenerator.cs
- XamlInt32CollectionSerializer.cs
- RecognizerInfo.cs
- Attribute.cs
- ViewLoader.cs