WriteGltfSceneToStream error reporting
Describe the issue
The function WriteGltfSceneToStream returns true unconditionally.
I believe it is intended to return false when writing the file fails.
To Reproduce
- OS: windows 10
- Compiler, compiler version, compile options: msvc 2019
Expected behaviour
WriteGltfSceneToStream returns false on error.
Both WriteGltfSceneToStream and WriteGltfSceneToFile returns true unconditionally.
I did some partial fix in this commit: https://github.com/syoyo/tinygltf/commit/81f7dbe53a112d05217a79bb1c986f9ada3b6631
WriteGltfSceneToFile would return false correctly when failed to write a file.
WriteGltfSceneToStream still returns true since there is no error check on stream write and also no error propagation mechanism when serializing JSON data to a string(related: https://github.com/syoyo/tinygltf/issues/332)
Your contribution of better error handling in Writer module is much appreciated!
Closing via #408