class BadDataException < RuntimeErrorendclass Person def initialize(name) raise BadDataException, "No name present" if name.empty? endend