Skip to content

Commit

Permalink
Add exception classes for the other responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Rarick committed May 29, 2008
1 parent 9a98642 commit 6c63672
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions lib/beanstalk-client/errors.rb
Expand Up @@ -48,6 +48,34 @@ class DeadlineSoonError < UnexpectedResponse
WORD = 'DEADLINE_SOON'
end

class NotIgnoredError < UnexpectedResponse
WORD = 'NOT_IGNORED'
end

class OutOfMemoryError < UnexpectedResponse
WORD = 'OUT_OF_MEMORY'
end

class InternalError < UnexpectedResponse
WORD = 'INTERNAL_ERROR'
end

class BadFormatError < UnexpectedResponse
WORD = 'BAD_FORMAT'
end

class UnknownCommandError < UnexpectedResponse
WORD = 'UNKNOWN_COMMAND'
end

class ExpectedCRLFError < UnexpectedResponse
WORD = 'EXPECTED_CRLF'
end

class JobTooBigError < UnexpectedResponse
WORD = 'JOB_TOO_BIG'
end

class WaitingForJobError < RuntimeError
end
end

0 comments on commit 6c63672

Please sign in to comment.