I have a code like this:
public void genericOperation(String username, String password) throws AuthFailedException(){
if(username == null || password == null) throw new NullPointerException();
AuthMethod(username,password)
}
The method AuthMethod check if username or password match, if not will it throws AuthFailedException.
Should I made it a checked exception (AuthFailedException extends Exception) or unchecked (AuthFailedException extends RuntimeException)?
I don't know if the client of this code want to recover the code in case of exceptions.