Raise first like an input check

This commit is contained in:
Lin Jen-Shin 2016-06-15 16:23:41 +08:00
parent a01623882e
commit 5608e1a159
1 changed files with 3 additions and 5 deletions

View File

@ -30,11 +30,9 @@ module Gitlab
mail_key = extract_mail_key(mail)
handler = Handler.for(mail, mail_key)
if handler
handler.execute
else
raise UnknownIncomingEmail
end
raise UnknownIncomingEmail unless handler
handler.execute
end
def build_mail