If the camera is eventually able to get past the write error screen and return to shooting mode, the clip will most likely be playable up to the point recording halted. If the camera freezes up and the clip's file length is zero, then it's been lost and cannot be recovered.
I've had some success recovering MTS clips from crashed recordings with PhotoRec: http://www.cgsecurity.org/wiki/PhotoRec
The interface isn't great, but it's free, and a good deal more powerful than a lot of other recovery software out there. (I tried quite a few others before PhotoRec worked.)
If nothing else works, then you can also try running CHKDSK (if you use Windows) and let it recover damaged files. I found once that it actually did a better job of recovering clips than PhotoRec. - But run this one at your own risk!