You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If PublicFieldsAndPropertiesHarvester is used, and a property access attempt throws an exception, the exception bubbles up to the top and cannot be handled, as in the code below.
It would be better to at least allow the user to have the exception returned as the value for that property instead.
System.Reflection.TargetInvocationException occurred
HResult=-2146232828
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at StatePrinter.FieldHarvesters.HarvestHelper.<>c__DisplayClass9.<GetFieldsAndProperties>b__6(Object o)
at StatePrinter.Introspection.IntroSpector.IntrospectComplexType(Object source, Field field, Type sourceType)
at StatePrinter.Introspection.IntroSpector.Introspect(Object source, Field field)
at StatePrinter.Introspection.IntroSpector.PrintObject(Object objectToPrint, String rootname)
at StatePrinter.Stateprinter.PrintObject(Object objectToPrint, String rootname)
InnerException:
HResult=-2146233088
Message=An identifier field is not present in this artifact's field collection.
Source=kCura.Relativity.Client
StackTrace:
at MyApplication.DTOs.Artifact.get_TextIdentifier()
InnerException:
The text was updated successfully, but these errors were encountered:
Have you given any thoughts on what to present in the output?
perhaps a general exception filter can be provided so you have a fighting chance of either failing (as the current behavior) or implement your own kind of output given knowledge of the field type.
If
PublicFieldsAndPropertiesHarvester
is used, and a property access attempt throws an exception, the exception bubbles up to the top and cannot be handled, as in the code below.It would be better to at least allow the user to have the exception returned as the value for that property instead.
The text was updated successfully, but these errors were encountered: