Throw an error if the end time comes before the start time.