The situation can bring two possible side effect to the child's mind:

1) He is going to think that divorce is not that bad. So, in the future, when there is a problem with me and my wife/husband, I'll just divorce and hook up with someone else.

2) They will lose respect for you. This usually occur with children older than certain age. You might not know it, you might know feel it, but they are experiencing it. Children don't always reveal everything that's inside, but whatever they see, it still stay with them for a long time.