Code: Select all
ISFSObject* DefaultSFSDataSerializer::DecodeSFSObject(ByteArray* buffer)
{
SFSObject* sfsObject = SFSObject::NewInstance();
// Get tpyeId
unsigned char headerByte;
buffer->ReadByte(headerByte);
// Validate typeId
if (headerByte != (unsigned char)SFSDATATYPE_SFS_OBJECT)
{
string* err = new string();
string* format = new string("Invalid SFSDataType. Expected: %d, found: %d");
StringFormatter<long int, unsigned char> (err, format, SFSDATATYPE_SFS_OBJECT, headerByte);
delete format;
format = NULL;
boost::shared_ptr<SFSCodecError> exception(new SFSCodecError(err));
throw exception;
}+ px 0x03763338 {message=0x03782880 "Invalid SFSDataType. Expected: 18, found: 120" } Sfs2X::Exceptions::SFSCodecError *