The FieldEntry header and impl are not in sync (2023-12-28).
In C++ we didn't check for BLANK code and retrieved an empty OmmArray from FieldEntry => no exception
In C# we didn't check for BLANK code and retrieved empty OmmArray from FieldEntry => throws OmmInvalidUsageException
Looks like implementation in C++ doesn't follow C++ header documentation (C++ header seems to follow C# logic).
FieldEntry.h contains:
/** Returns current OMM data represented as an OmmArray.
@throw OmmInvalidUsageException if contained object is not OmmArray
@throw OmmInvalidUsageException if getCode() returns Data::BlankEnum
@return OmmArray class reference to contained object
*/
const OmmArray& getArray() const;
FieldEntry.cpp contains:
const OmmArray& FieldEntry::getArray() const
{
if ( (_pLoad)->getDataType() != DataType::ArrayEnum )
{
EmaString temp( "Attempt to getArray() while actual entry data type is " );
temp += getDTypeAsString( (_pLoad)->getDataType() );
throwIueException( temp, OmmInvalidUsageException::InvalidOperationEnum );
}
Hi guys,
The FieldEntry header and impl are not in sync (2023-12-28).
In C++ we didn't check for BLANK code and retrieved an empty OmmArray from FieldEntry => no exception In C# we didn't check for BLANK code and retrieved empty OmmArray from FieldEntry => throws OmmInvalidUsageException
Looks like implementation in C++ doesn't follow C++ header documentation (C++ header seems to follow C# logic).
FieldEntry.h contains:
FieldEntry.cpp contains:
const OmmArray& FieldEntry::getArray() const { if ( (_pLoad)->getDataType() != DataType::ArrayEnum ) { EmaString temp( "Attempt to getArray() while actual entry data type is " ); temp += getDTypeAsString( (_pLoad)->getDataType() ); throwIueException( temp, OmmInvalidUsageException::InvalidOperationEnum ); }
}