LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
TurboPhil

Include Class Name in Deserialization Errors

Status: New

Include the name of the class in error messages for common error codes such as:

1400 Attempted to read flattened data of a LabVIEW class. The flat data could not be converted to the requested type because the flat data is not the same as the requested type nor is it the same as any child class of the requested type.
1401 Attempted to read flattened data of a LabVIEW class. The version of the class currently in memory is older than the version of the data. You must find a newer version of the class to load this data.
1402 Attempted to read flattened data of a LabVIEW class. The data was written by an old version of the class and the class in memory no longer supports loading and mutating data from that older version.

 

For those of us that aren't using the AQ Character Lineator and do just simple flatten/unflatten of objects (e.g. when sending over TCP), it's pretty common to run into these errors. It would be nice to see the specific class that is showing disagreement. 

 

---

 

Yes, we could probably match the *.lvclass pattern out of the flattened string, but then we have to do some wire branching just in case there might be an error...and we also can't easily wrap up that logic for generalization for anywhere that we unflatten class data (without fancy xnode polymorphism).

1 Comment
AristosQueue (NI)
NI Employee (retired)

"A great request," says the guy who implemented all three of those error codes and really wishes he'd been able to do that originally. 🙂 The error reporting mechanisms within LV's backend code have advanced significantly since 2005. This should be a straightforward request now, I think. I no longer work on that code, but I hope when those nodes get revisited in the next couple years that this issue gets fixed. I'll flag it for the team.

 

Kudos.