Added Ruby styles for handling exceptions.