Fixed syntax errors with exceptions.