thank you for the PR, which i just merged to version V0.23. It is fore sure useful.
I also integrated a fix for this problem here: https://forum.freecadweb.org/viewtopic.php?f=3&t=36588
Thx a lot, Klaus
What data are you thinking about to write ?
probably the classical topological naming problem of FreeCAD : when creating any object, FreeCAD gives it a name, and when you assemble those objects the constraints apply to the name of the object, not the visual of the object. When you modify the object, FreeCAD may - or may not - attribute a new name to the object, but the constraint doesn't know this, and thus the constraint applies to inexistant - or wrong - objects.
I think the main reason that FreeCAD's seems so severe is that the error message just says to delete the last mate. In many cases the last mate may have caused the error but it may not be the mate that you want to delete. In this case it would be nice to know which mates are failing.