+ Start a Discussion
Sowndarya KesariSowndarya Kesari 

Custom exception for Reusing Old Password

Hi All,
I have developed an API which let user to change his/her password. I used system.setPassword() method for this.

Now, when a user uses his previous passwords it will throw an exception "System.InvalidParameterValueException: UNKNOWN_EXCEPTION: invalid repeated password". I want to handle it and show different error message.

Could you help me how I can handle this?