Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Utils / ExceptionHelpers.cs / 1305376 / ExceptionHelpers.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Diagnostics;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.Utils
{
// Miscellaneous helper routines for generating mapping exceptions
internal static class ExceptionHelpers
{
internal static void ThrowMappingException(ErrorLog.Record errorRecord, ConfigViewGenerator config)
{
InternalMappingException exception = new InternalMappingException(errorRecord.ToUserString(), errorRecord);
if (config.IsNormalTracing)
{
exception.ErrorLog.PrintTrace();
}
throw exception;
}
internal static void ThrowMappingException(ErrorLog errorLog, ConfigViewGenerator config)
{
InternalMappingException exception = new InternalMappingException(errorLog.ToUserString(), errorLog);
if (config.IsNormalTracing)
{
exception.ErrorLog.PrintTrace();
}
throw exception;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Diagnostics;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.Utils
{
// Miscellaneous helper routines for generating mapping exceptions
internal static class ExceptionHelpers
{
internal static void ThrowMappingException(ErrorLog.Record errorRecord, ConfigViewGenerator config)
{
InternalMappingException exception = new InternalMappingException(errorRecord.ToUserString(), errorRecord);
if (config.IsNormalTracing)
{
exception.ErrorLog.PrintTrace();
}
throw exception;
}
internal static void ThrowMappingException(ErrorLog errorLog, ConfigViewGenerator config)
{
InternalMappingException exception = new InternalMappingException(errorLog.ToUserString(), errorLog);
if (config.IsNormalTracing)
{
exception.ErrorLog.PrintTrace();
}
throw exception;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QuerySafeNavigator.cs
- FunctionImportElement.cs
- ProfileParameter.cs
- ActivityInstanceMap.cs
- DesignerDataTable.cs
- SessionPageStateSection.cs
- SelectedDatesCollection.cs
- XmlSerializerVersionAttribute.cs
- ToolStripItem.cs
- ContainerActivationHelper.cs
- MenuScrollingVisibilityConverter.cs
- XhtmlBasicObjectListAdapter.cs
- ExpressionEditorSheet.cs
- WindowsContainer.cs
- TextProperties.cs
- EventToken.cs
- SequentialWorkflowHeaderFooter.cs
- TraceContextEventArgs.cs
- ProtectedConfigurationSection.cs
- TextStore.cs
- ObjectHandle.cs
- NameObjectCollectionBase.cs
- PathFigureCollection.cs
- ClientOperation.cs
- RuntimeConfigLKG.cs
- SqlUdtInfo.cs
- PersonalizationProvider.cs
- XmlAtomErrorReader.cs
- WeakEventManager.cs
- InstanceNotReadyException.cs
- BypassElementCollection.cs
- ToolstripProfessionalRenderer.cs
- SQLSingleStorage.cs
- LocalizeDesigner.cs
- ToolStripSplitButton.cs
- BridgeDataRecord.cs
- HwndSourceKeyboardInputSite.cs
- MarkedHighlightComponent.cs
- XsltException.cs
- IgnoreSectionHandler.cs
- SplineKeyFrames.cs
- FileInfo.cs
- StoreAnnotationsMap.cs
- SecurityUniqueId.cs
- CodeDelegateCreateExpression.cs
- XmlUrlResolver.cs
- TemplateField.cs
- SqlGenerator.cs
- ICspAsymmetricAlgorithm.cs
- SafeNativeMemoryHandle.cs
- Help.cs
- BamlTreeNode.cs
- InputReferenceExpression.cs
- SHA1Managed.cs
- QilFactory.cs
- ConfigurationLocationCollection.cs
- CompiledELinqQueryState.cs
- PropertiesTab.cs
- CookieHandler.cs
- DataListItemEventArgs.cs
- RequestTimeoutManager.cs
- DbProviderManifest.cs
- DataPagerCommandEventArgs.cs
- Monitor.cs
- FormClosedEvent.cs
- JulianCalendar.cs
- CodeObjectCreateExpression.cs
- TransformerTypeCollection.cs
- QuerySelectOp.cs
- UserInitiatedNavigationPermission.cs
- EntityDataSourceState.cs
- ObjectQuery_EntitySqlExtensions.cs
- HijriCalendar.cs
- BypassElementCollection.cs
- ProfilePropertySettingsCollection.cs
- SamlAssertionKeyIdentifierClause.cs
- ExpressionParser.cs
- SplineKeyFrames.cs
- DefaultValueAttribute.cs
- AccessText.cs
- NavigateEvent.cs
- _ConnectionGroup.cs
- InputLanguageCollection.cs
- ExpressionList.cs
- XmlNamespaceManager.cs
- _ShellExpression.cs
- ControlBindingsCollection.cs
- OracleCommand.cs
- Positioning.cs
- BreakRecordTable.cs
- DesignerActionKeyboardBehavior.cs
- RedBlackList.cs
- XamlToRtfParser.cs
- SQLRoleProvider.cs
- XmlLinkedNode.cs
- datacache.cs
- UDPClient.cs
- IODescriptionAttribute.cs
- CellNormalizer.cs
- ObjectStateFormatter.cs