Topic: When committing a sin . . .
no photo
Tue 02/11/14 11:59 AM
WHEN COMMITTIN A SIN:

When committing a sin, the Muslim should not do it openly or tell anybody about it unless he is seeking advice or asking to be purnished.

Thus, in this case he is allowed to tell the ruler about it. If he is to do it openly, he will encourage other people to do the same. Hence, the Prophet (SAW) says, "All the sins of my followers will be forgiven except those of the mujahirin (those who commit a sin openly or disclose their sins to the people). An example of such disclosure is that a person commits a sin at night and though Allah screens it from public, then he comes in the morning, and say, "o so-and-so, I did such-and-such (evil) deed yesterday," though he spent his night screened by his Lord (no one knowing about his sin) and in the morning he removes Allah's screen from himself". (Collected by Al-Bukhari and Muslim)

***NOTE***
That does not mean you should keep on sin secretly. Allah knows best!