That is completely foolish. If one KNEW that he would make a mistake, he WOULD NOT do it in the first place.
That is why “sin” is always the cause of sadness when realized. It is the sadness of being in err. Now put some nice religious guilt on it and you have the perfect recipe for depression.
Yes you CAN be mistaken, but you WOULD NOT if you knew it beforehand.