Exception: DBI::DatabaseError

Inherits:
Error
  • Object
show all
Defined in:
lib/dbi/exceptions.rb

Overview

Exception for errors related to the database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errstr = "", err = nil, state = nil) ⇒ DatabaseError

Returns a new instance of DatabaseError.



26
27
28
29
# File 'lib/dbi/exceptions.rb', line 26

def initialize(errstr="", err=nil, state=nil)
    super(errstr)
    @err, @errstr, @state = err, errstr, state
end

Instance Attribute Details

#errObject (readonly)

Returns the value of attribute err.



24
25
26
# File 'lib/dbi/exceptions.rb', line 24

def err
  @err
end

#errstrObject (readonly)

Returns the value of attribute errstr.



24
25
26
# File 'lib/dbi/exceptions.rb', line 24

def errstr
  @errstr
end

#stateObject (readonly)

Returns the value of attribute state.



24
25
26
# File 'lib/dbi/exceptions.rb', line 24

def state
  @state
end