Exception: DBI::DatabaseError
- 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
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#errstr ⇒ Object
readonly
Returns the value of attribute errstr.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(errstr = "", err = nil, state = nil) ⇒ DatabaseError
constructor
A new instance of DatabaseError.
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
#err ⇒ Object (readonly)
Returns the value of attribute err.
24 25 26 |
# File 'lib/dbi/exceptions.rb', line 24 def err @err end |
#errstr ⇒ Object (readonly)
Returns the value of attribute errstr.
24 25 26 |
# File 'lib/dbi/exceptions.rb', line 24 def errstr @errstr end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
24 25 26 |
# File 'lib/dbi/exceptions.rb', line 24 def state @state end |