Re: How to handle read/write errors in schema methods


Joshua Minor
 

In OTIO adapters we've relied heavily on Python exceptions for this sort of thing. Similarly for SchemaDef plugins which are currently Python-only.

The core C++ layer doesn't use exceptions, so we don't have the same mechanism there. The error mechanism we currently have in deserialization is the bool return code from the `read_from` method, and the error status on the reader object. You can see an example in composition.cpp here: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/35edffb020371edab947c7586fa926f619b83526/src/opentimelineio/composition.cpp#L123

Join otio-discussion@lists.aswf.io to automatically receive all group messages.