Exception: DBI::DatabaseError

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

Overview

Exception for errors related to the database.

Direct Known Subclasses

DataError, IntegrityError, InternalError, NotSupportedError, OperationalError, ProgrammingError

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (DatabaseError) initialize(errstr = "",, err = nil, state = nil)

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

- (Object) err (readonly)

Returns the value of attribute err



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

def err
  @err
end

- (Object) errstr (readonly)

Returns the value of attribute errstr



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

def errstr
  @errstr
end

- (Object) state (readonly)

Returns the value of attribute state



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

def state
  @state
end