Exception: SQLite3::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- SQLite3::Exception
- Defined in:
- lib/sqlite3/errors.rb
Direct Known Subclasses
AbortException, AuthorizationException, BusyException, CantOpenException, ConstraintException, CorruptException, EmptyException, FormatException, FullException, IOException, InternalException, InterruptException, LockedException, MemoryException, MismatchException, MisuseException, NotADatabaseException, NotFoundException, PermissionException, ProtocolException, RangeException, ReadOnlyException, SQLException, SchemaChangedException, TooBigException, UnsupportedException
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
A convenience for accessing the error code for this exception.
-
#sql ⇒ Object
readonly
If the error is associated with a SQL query, this is the query.
-
#sql_offset ⇒ Object
readonly
If the error is associated with a particular offset in a SQL query, this is the non-negative offset.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object (readonly)
A convenience for accessing the error code for this exception.
6 7 8 |
# File 'lib/sqlite3/errors.rb', line 6 def code @code end |
#sql ⇒ Object (readonly)
If the error is associated with a SQL query, this is the query
9 10 11 |
# File 'lib/sqlite3/errors.rb', line 9 def sql @sql end |
#sql_offset ⇒ Object (readonly)
If the error is associated with a particular offset in a SQL query, this is the non-negative offset. If the offset is not available, this will be -1.
13 14 15 |
# File 'lib/sqlite3/errors.rb', line 13 def sql_offset @sql_offset end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/sqlite3/errors.rb', line 15 def [super, sql_error].compact.join(":\n") end |