Void ValueTree::writeToStream (OutputStream &output) const


#1

Any reason this can’t be updated to return an error if it fails?


#2

It doesn’t look like it would fail. Make sure you check isValid() before attempting the call.


#3

Ah - to be fair - it can. But I’ve just realised that I can then later query the outputstream to see if it failed… so ignore the request :slight_smile:


#4

Yeah, this is typically how I handle serialization errors. The OutputStream can be made to have better error descriptions too. Although in practice I have more error checking on Read than Write.