public
Description: Amazon Web Services SimpleDB for Ruby
Homepage: http://rubyforge.org/projects/aws-sdb/
Clone URL: git://github.com/dysinger/aws-sdb.git
Search Repo:
dysinger (author)
Sun Dec 16 11:13:45 -0800 2007
commit  bd96f54cadf13d996af3e840e23d4c6aa5a3d52d
tree    01eb2a9db199070f3f1ae89e50ba010bfff398d9
aws-sdb / lib / aws / sdb / error.rb
100644 28 lines (22 sloc) 0.533 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module AWS
  module SDB
      
    class Error < RuntimeError ; end
  
    class RequestError < Error
      attr_accessor :errors
    
      def initialize(errors = {})
        super(errors.values.inspect)
        @errors = errors
      end
    end
 
    class ConnectionError < Error
      attr_reader :response
 
      def initialize(response)
        super(
          "#{response.code} #{response.message \
             if response.respond_to?(:message)}"
        )
        @response = response
      end
    end
  
  end
end