Closed kosloot closed 3 years ago
Not sure what you mean, failed appends would raise an exception, catching those enables programs to continue and attempt other things. So I'd say the python library is robust against it yes?
Well, in libfolia I encountered a situation where append didn't throw but ab operation directly afterwards DID (notably checking if a Annotation Layer has the same set as the appended child) This is just a reminder/warning to check the code for this risk. for instance postappend() should NOT trow, OR revert the append().
checking the code in this respect might be wise.
a more compelling example is text checking. This is postponed to the serializing step of FoLiA. When at that moment an error is detected, a roll-back is hardly possible. I think we have to (and can) live with that.
closing this. It is acceptable to NOT detect all errors, as long a at the end at least one error is detected and NO invalid FoLiA is produced.
Some operations, especially appending should leave the original document untouched. This enables users/programs to continue with the document, attempting other operations, like edit/save etc. At the moment preserving is probably not always the case, leaving a failed addition IN the document, rendering it invalid. Some code overhauling might be necessary. @proycon is the Python version robust against these problems ?