at Dbosoft.YaNco.Internal.Api.GetTypeDescription(IDataContainerHandle dataContainer, RfcErrorInfo& errorInfo) in /src/YaNco.Core/Internal/Api.cs:line 79
at Dbosoft.YaNco.RfcRuntime.GetTypeDescription(IDataContainerHandle dataContainer) in /src/YaNco.Core/RfcRuntime.cs:line 167
at Dbosoft.YaNco.DataContainer.GetTypeDescription() in /src/YaNco.Core/DataContainer.cs:line 53
What is null?
The dataContainer that is passed to Api.GetTypeDescription is null.
Why?
In RfcRuntime.cs, line 167 we have:
ITypeDescriptionHandle handle = Api.GetTypeDescription(dataContainer as Internal.IDataContainerHandle, out var errorInfo);
Both StructureHandle and FunctionHandle classes implement IDataContainerHandle, but TableHandle class does not. When the GetTypeDescription() method is called on a Table object, since its _handle field does not implement Internal.IDataContainerHandle, the above line of code passes null to the Api.GetTypeDescription.
Call stack:
What is null?
The
dataContainer
that is passed toApi.GetTypeDescription
is null.Why?
In RfcRuntime.cs, line 167 we have:
Both
StructureHandle
andFunctionHandle
classes implementIDataContainerHandle
, butTableHandle
class does not. When theGetTypeDescription()
method is called on aTable
object, since its_handle
field does not implementInternal.IDataContainerHandle
, the above line of code passesnull
to theApi.GetTypeDescription
.