This is the line that catches the error - the rest is to do with reporting it sensibly.