def throw_if_true(param) begin raise "test exception" if param rescue Exception => e puts "rescue" else puts "else" endendthrow_if_true(true)# printed: "rescue"throw_if_true(false)# printed only "else"