Catch exception for a line and prints message, rather than raising