>>2310548ran out of characters;
If your ferment goes moldy, you can usually skim the mold off the top. sometimes a layer of yeast forms on top, this actually protects your ferment. I have once opened a jar to find a solid layer of green and white mold that had a layer of yeast under it, i know this because the whole thing skimmed off in one piece to reveal perfectly fermented cabbage underneath. it was delicious.
You will know if it has gone bad, it smells like sick and tastes BAD. it usually smells bad during fermentation, but not terrible.