summaryrefslogtreecommitdiff
path: root/lib/gitlab/email/receiver.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-20 11:33:18 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-20 11:33:18 -0700
commit2f78b5e8afbf0024211bbd5bfe3a6c6f53b2421e (patch)
tree098f960816549cfb504bdcf590eee85f75d83f4f /lib/gitlab/email/receiver.rb
parent0b401f2e94c5062d26887cdeda73341c1aae82a5 (diff)
downloadgitlab-ce-2f78b5e8afbf0024211bbd5bfe3a6c6f53b2421e.tar.gz
Make error class names more consistent.
Diffstat (limited to 'lib/gitlab/email/receiver.rb')
-rw-r--r--lib/gitlab/email/receiver.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index 7160af29089..466e48b22e1 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -4,13 +4,13 @@ module Gitlab
class Receiver
class ProcessingError < StandardError; end
class EmailUnparsableError < ProcessingError; end
+ class SentNotificationNotFoundError < ProcessingError; end
class EmptyEmailError < ProcessingError; end
+ class AutoGeneratedEmailError < ProcessingError; end
class UserNotFoundError < ProcessingError; end
class UserNotAuthorizedError < ProcessingError; end
class NoteableNotFoundError < ProcessingError; end
- class AutoGeneratedEmailError < ProcessingError; end
- class SentNotificationNotFound < ProcessingError; end
- class InvalidNote < ProcessingError; end
+ class InvalidNoteError < ProcessingError; end
def initialize(raw)
@raw = raw
@@ -23,7 +23,7 @@ module Gitlab
end
def execute
- raise SentNotificationNotFound unless sent_notification
+ raise SentNotificationNotFoundError unless sent_notification
raise EmptyEmailError if @raw.blank?
@@ -53,7 +53,7 @@ module Gitlab
message << "\n\n- #{error}"
end
- raise InvalidNote, message
+ raise InvalidNoteError, message
end
end