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
- ProgressBar.cs
- VisualStyleRenderer.cs
- PageAsyncTask.cs
- CrossAppDomainChannel.cs
- ManagementClass.cs
- ActivityAction.cs
- MailMessage.cs
- SHA384.cs
- Attributes.cs
- FacetChecker.cs
- SID.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- MonthChangedEventArgs.cs
- XmlRootAttribute.cs
- SolidColorBrush.cs
- PropertyDescriptorComparer.cs
- TextCharacters.cs
- RuleConditionDialog.cs
- Scripts.cs
- DesignerLoader.cs
- WinFormsUtils.cs
- Font.cs
- SecurityPermission.cs
- MethodSignatureGenerator.cs
- HwndAppCommandInputProvider.cs
- TextEditorContextMenu.cs
- ReliableSession.cs
- InvalidDataContractException.cs
- StyleBamlTreeBuilder.cs
- TypeHelpers.cs
- SmiGettersStream.cs
- GeometryCollection.cs
- ProtocolsConfigurationEntry.cs
- DataGridViewCellPaintingEventArgs.cs
- ModifierKeysValueSerializer.cs
- validationstate.cs
- DataGridViewCellStateChangedEventArgs.cs
- UIElementParagraph.cs
- DataSourceControl.cs
- FreezableOperations.cs
- RuntimeHelpers.cs
- AlphaSortedEnumConverter.cs
- DictionaryKeyPropertyAttribute.cs
- NegatedCellConstant.cs
- DataGridViewColumn.cs
- SafeHandle.cs
- CfgRule.cs
- StorageMappingItemCollection.cs
- TextElementCollectionHelper.cs
- COM2ICategorizePropertiesHandler.cs
- SQLSingleStorage.cs
- AttributeEmitter.cs
- ObjectConverter.cs
- RuleInfoComparer.cs
- XmlSchemaProviderAttribute.cs
- CommandField.cs
- QilPatternFactory.cs
- GridViewCancelEditEventArgs.cs
- ImmutableCollection.cs
- Add.cs
- AmbientLight.cs
- Matrix.cs
- SystemIPGlobalProperties.cs
- StylusOverProperty.cs
- MatchSingleFxEngineOpcode.cs
- StringUtil.cs
- UserControl.cs
- PowerModeChangedEventArgs.cs
- CharEnumerator.cs
- TableCell.cs
- HasCopySemanticsAttribute.cs
- Debugger.cs
- RoutingEndpointTrait.cs
- TextWriter.cs
- ScrollItemProviderWrapper.cs
- Size3DValueSerializer.cs
- SynchronizationScope.cs
- SubqueryRules.cs
- ColorConvertedBitmap.cs
- ExceptionHandlerDesigner.cs
- MessageQueueException.cs
- WinFormsSpinner.cs
- TickBar.cs
- TextRangeEdit.cs
- CalendarKeyboardHelper.cs
- QilName.cs
- PasswordRecovery.cs
- IisHelper.cs
- NamespaceEmitter.cs
- CompositeCollection.cs
- Activity.cs
- HttpListenerRequest.cs
- ScriptResourceDefinition.cs
- SpStreamWrapper.cs
- WinEventQueueItem.cs
- FormViewPageEventArgs.cs
- IntSumAggregationOperator.cs
- ReferenceEqualityComparer.cs
- XamlClipboardData.cs
- ConcurrencyBehavior.cs