Exception: ThinkingSphinx::SphinxError
- Inherits:
-
StandardError
- Object
- StandardError
- ThinkingSphinx::SphinxError
- Defined in:
- lib/thinking_sphinx/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#statement ⇒ Object
Returns the value of attribute statement.
Class Method Summary collapse
Instance Attribute Details
#statement ⇒ Object
Returns the value of attribute statement.
2 3 4 |
# File 'lib/thinking_sphinx/errors.rb', line 2 def statement @statement end |
Class Method Details
.new_from_mysql(error) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/thinking_sphinx/errors.rb', line 4 def self.new_from_mysql(error) case error. when /parse error/ replacement = ThinkingSphinx::ParseError.new(error.) when /syntax error/ replacement = ThinkingSphinx::SyntaxError.new(error.) when /query error/ replacement = ThinkingSphinx::QueryError.new(error.) else replacement = new(error.) end replacement.set_backtrace error.backtrace replacement.statement = error.statement if error.respond_to?(:statement) replacement end |