diff options
Diffstat (limited to 'lib/mogilefs.rb')
-rw-r--r-- | lib/mogilefs.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/mogilefs.rb b/lib/mogilefs.rb index 6059836..cf6b5df 100644 --- a/lib/mogilefs.rb +++ b/lib/mogilefs.rb @@ -16,18 +16,18 @@ module MogileFS end # Standard error class for most MogileFS-specific errors - class Error < StandardError; end + Error = Class.new(StandardError) # Raised when a socket remains unreadable for too long. - class UnreadableSocketError < Error; end + UnreadableSocketError = Class.new(Error) # Raised when a response is truncated while reading # due to network/server # errors) - class SizeMismatchError < Error; end + SizeMismatchError = Class.new(Error) # Raised when checksum verification fails (only while reading deprecated # "bigfiles" from the deprecated mogtool(1). - class ChecksumMismatchError < RuntimeError; end + ChecksumMismatchError = Class.new(RuntimeError) # Raised when a backend is in read-only mode class ReadOnlyError < Error @@ -37,27 +37,27 @@ module MogileFS end # Raised when an upload is impossible - class EmptyPathError < Error; end + EmptyPathError = Class.new(Error) # Raised when we are given an unsupported protocol to upload to. # Currently, the \MogileFS (2.XX) server only supports HTTP and # this library is only capable of HTTP. - class UnsupportedPathError < Error; end + UnsupportedPathError = Class.new(Error) # Raised when a request (HTTP or tracker) was truncated due to a network or # server error. It may be possible to retry idempotent requests from this. - class RequestTruncatedError < Error; end + RequestTruncatedError = Class.new(Error) # Raised when a response from a server (HTTP or tracker) is not in a format # that we expected (or truncated.. - class InvalidResponseError < Error; end + InvalidResponseError = Class.new(Error) # Raised when all known backends have failed. - class UnreachableBackendError < Error; end + UnreachableBackendError = Class.new(Error) # There was an error as a result of the use of the (experimental) # pipelining code to the tracker backend - class PipelineError < Error; end + PipelineError = Class.new(Error) # :stopdoc: class << self |