Better not to tell own sins to other, definitely scholars are like doctor. When we are not be able to hide our illness to doctors because he will not give exact medicine, same scholars helps to keep ourselves far from sins and motivated to good deeds.
We can ask about sins in general, it would be better