Exception: Archsight::Query::QueryError
- Inherits:
-
StandardError
- Object
- StandardError
- Archsight::Query::QueryError
- Defined in:
- lib/archsight/query/errors.rb
Overview
Base error class for all query-related errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(message, position: nil, source: nil) ⇒ QueryError
constructor
A new instance of QueryError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, position: nil, source: nil) ⇒ QueryError
Returns a new instance of QueryError.
7 8 9 10 11 |
# File 'lib/archsight/query/errors.rb', line 7 def initialize(, position: nil, source: nil) @position = position @source = source super() end |
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
5 6 7 |
# File 'lib/archsight/query/errors.rb', line 5 def position @position end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/archsight/query/errors.rb', line 5 def source @source end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/archsight/query/errors.rb', line 13 def to_s if @position && @source line_info = extract_line_info "#{super}\n#{line_info}" else super end end |