NGSerializer fails with an error during startup when I try and serialize an Exception sub class even though I have [NoInherited] Attribute to the sub class. So I have the following class defined that I want to serialize:
MyException = Class(Exception)
. . . .
Property ErrorMsg : String . . .
Property ErrorCode : Integer . . .,
Property ExtendedErrorMessage : String . . .
Then in my return code I create a serializer like this:
Serializer := TNativeXMLSerializer<MyException>.Create;
When I attempt to start my application I get the following error. <MyApp.exe> raised exception class ESerialize with message 'Cannot serialize values of type Pointer' When looking at the base Exception class there is a public property that is a pointer, but since I have specified NoInherited attribute these should be ignored. Is this a Bug?.
I have also noticed this same error with a property in the serializable class marked with the Transient attribute.
Why doesn't the serializer actually ignore Transient and inherited properties during startup when these attributes are used?