Sha256: e9a2679fdc94812e0d6f10ebb5259b2eaea7c1bbab8da6e145f30081150aedb5

Contents?: true

Size: 481 Bytes

Versions: 20

Compression:

Stored size: 481 Bytes

Contents

module DataObjects
  class SQLError < Error

    attr_reader :message
    attr_reader :code
    attr_reader :sqlstate
    attr_reader :query
    attr_reader :uri

    def initialize(message, code = nil, sqlstate = nil, query = nil, uri = nil)
      @message = message
      @code = code
      @sqlstate = sqlstate
      @query = query
      @uri = uri
    end

    def to_s
      "#{message} (code: #{code}, sql state: #{sqlstate}, query: #{query}, uri: #{uri})"
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
data_objects-0.10.17 lib/data_objects/error/sql_error.rb
data_objects-0.10.16 lib/data_objects/error/sql_error.rb
data_objects-0.10.15 lib/data_objects/error/sql_error.rb
data_objects-0.10.14 lib/data_objects/error/sql_error.rb
data_objects-0.10.13 lib/data_objects/error/sql_error.rb
data_objects-0.10.12 lib/data_objects/error/sql_error.rb
data_objects-0.10.11 lib/data_objects/error/sql_error.rb
data_objects-0.10.10 lib/data_objects/error/sql_error.rb
data_objects-0.10.9 lib/data_objects/error/sql_error.rb
data_objects-0.10.8 lib/data_objects/error/sql_error.rb
data_objects-0.10.7 lib/data_objects/error/sql_error.rb
data_objects-0.10.6 lib/data_objects/error/sql_error.rb
data_objects-0.10.5 lib/data_objects/error/sql_error.rb
data_objects-0.10.4 lib/data_objects/error/sql_error.rb
data_objects-0.10.4.rc2 lib/data_objects/error/sql_error.rb
data_objects-0.10.4.rc1 lib/data_objects/error/sql_error.rb
data_objects-0.10.3 lib/data_objects/error/sql_error.rb
data_objects-0.10.2 lib/data_objects/error/sql_error.rb
data_objects-0.10.1 lib/data_objects/error/sql_error.rb
data_objects-0.10.0 lib/data_objects/error/sql_error.rb