Replace the last of the ad-hoc RuntimeError exceptions
[ruby-mogilefs-client.git] / lib / mogilefs.rb
blobcbfc5da78a1f7e3d2c0569f56d51ca1cadbef0f0
1 ##
2 # MogileFS is a Ruby client for Danga Interactive's open source distributed
3 # filesystem.
5 # To read more about Danga's MogileFS: http://danga.com/mogilefs/
7 module MogileFS
9   VERSION = '1.3.1'
11   ##
12   # Raised when a socket remains unreadable for too long.
14   class Error < StandardError; end
15   class UnreadableSocketError < Error; end
16   class ReadOnlyError < Error
17     def message; 'readonly mogilefs'; end
18   end
19   class EmptyPathError < Error
20     def message; 'Empty path for mogile upload'; end
21   end
23   class RequestTruncatedError < Error; end
24   class InvalidResponseError < Error; end
25   class UnreachableBackendError < Error
26     def message; "couldn't connect to mogilefsd backend"; end
27   end
29 end
31 require 'socket'
33 require 'mogilefs/backend'
34 require 'mogilefs/nfsfile'
35 require 'mogilefs/httpfile'
36 require 'mogilefs/client'
37 require 'mogilefs/mogilefs'
38 require 'mogilefs/admin'