Minor improvement to catch block in CommitCheck.