Just a tip if this happened because you weren’t logged in when you pressed “Reply”. Sometimes when you go to the previous page in the browser after the error message is displayed, and put your cursor in the text box, your previous text will have been cached and will still be there.
You are right, though, that safest is to copy your text before you hit send, because you never know what glitch will happen with software.
@David1054 Yes, always copy before hitting Reply, so you can paste it back in if it disappears into cyberspace. This generally happens with longer posts- it somehow times out. Short posts don't seem to have this issue.