0
Completed

Improve logging info for attributeValue errors

Matthew Woolnough 11 years ago updated by anonymous 9 years ago 7

Bubble up the name/id of the transformation that caused the error so that it is easy for the layman to identify the cause of the problem.

20130411,07:34:24,Adapter get all entities for adapter failed.,Adapter,Warning,"Adapter get all entities for adapter 365e6a23-2e27-485f-a6e5-52ccd3347634 failed with reason Specified argument was out of the range of valid values.
Parameter name: attributeValue. Duration: 00:00:05.3996214
Error details:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: attributeValue
   at Unify.Framework.DistinguishedNameComponent..ctor(DNAttributeType attributeType, String attributeValue)
   at Unify.Framework.EntityFieldValueDistinguishedNameComponentGenerator`2.Transform(TEntity sourceValue)
   at Unify.Framework.EntityDistinguishedNameGenerator`2.<>c__DisplayClass3.<Transform>b__0(IEntityDistinguishedNameComponentGenerator`2 componentFactory)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Unify.Framework.EntityDistinguishedNameGenerator`2.Transform(TEntity sourceValue)
   at Unify.Framework.AdapterEntity.Convert(IEntity source, Func`2 dnFactory, Func`2 classFactory)
   at Unify.Framework.Adapter.<GetTransformedEntities>b__7a(IEntity item)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at Unify.Framework.EnumerableExtensions.<ActionOnFirst>d__1c`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Unify.Framework.ActionOnExceptionEnumerator`1.MoveNext()
   at Unify.Framework.EnumerableExtensions.<ActionOnLast>d__16`1.MoveNext()
   at Unify.Framework.EnumerableStreamWriter`2.OnWriteBodyContents(Stream stream, IEnumerable`1 enumerable)
   at Unify.Framework.EnumerableStreamWriter`2.<>c__DisplayClass2.<.ctor>b__0(Stream stream)
   at Unify.Framework.LazyEvaluationStream.Evaluate(Object obj)",Normal

Tony, could you please check v4.0 to see where it would fail if a base connector is missing? I seem to recall that it fails gracefully and just disables the adapter. If that is the case, please resolve.

In v4.0 if the base (or relational) connector doesn't exist, the adapter is disabled and cannot be reenabled until the configuration is fixed. Warnings are displayed on the adapter details section.

Please see Tony's comment.

This error was thrown due to the DN generator being fed a Null value. nothing to do this connectors not existing.

Ah my bad, mistakenly thought this related to the other work you were doing.

Yes, it should be possible to add the additional information here, and also sensible to add wherever possible.

This has been fixed.