Why does my try/catch statement gives me an input mismatchexception error and kills the program?

try {

System.out.println("enter how many salaries");
amount = input.nextInt();
}catch(InputMismatchException e) {

System.out.println("enter a valid number for the amount of salaries");
amount = input.nextInt();
}
im using that to try to check that an int is entered into the sccanner instead of a number any idea why id still be getting an inputmismatchexception