java – Using custom exceptions


I have a problem with the exceptions; I have to do a basic Spanish-English translator, I have two ArrayList, one for words in spanish and another for words in English. One of the methods is to translate from Spanish, as follows:

/ **
* The word we want to translate into English has passed through parameters.
* @param espanol
* @throws WordNoEncontradaException
* /
public void translateEspanolIngles (String espanol) throws PalabraNoEncontradaException {
// search the word language table
for (int search = 0; search <wordsespanol.size (); search ++) {

if (palabrasespanol.get (search) .equals (espanol)) {
System.out.println ("Spanish word:" + espanol);
System.out.println ("English word:" + palabrasingles.get (search));

otherwise, launch the new WordNoEncontradaException ();
}
}

I have to use custom exceptionsthis is where failure gives me. The exception is:

Public class WordNoEncontradaException extended Exception {

/ **
*
* /
private static final long serialVersionUID = 1L;

public WordNoEncontradaException () {
System.err.println ("The word you are looking for does not exist or has a syntax error.");
}
}

At the moment of the execution of the code, the exception is always thrown, although the method works correctly. How can I prevent his release continuously? I've already tried with try / catch.