Catches any exceptions during grading.