If fails then error caught and displayed