Exception: Db2Query::QueryDefinitionError
- Inherits:
-
StandardError
- Object
- StandardError
- Db2Query::QueryDefinitionError
- Defined in:
- lib/db2_query/error.rb
Instance Method Summary collapse
-
#initialize(klass, query_name = nil, column = nil) ⇒ QueryDefinitionError
constructor
A new instance of QueryDefinitionError.
- #message ⇒ Object
Constructor Details
#initialize(klass, query_name = nil, column = nil) ⇒ QueryDefinitionError
Returns a new instance of QueryDefinitionError.
58 59 60 61 62 63 |
# File 'lib/db2_query/error.rb', line 58 def initialize(klass, query_name = nil, column = nil) @klass = klass @query_name = query_name @column = column super() end |
Instance Method Details
#message ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/db2_query/error.rb', line 65 def if @query_name.nil? "Definitions::#{@klass}Definitions file not found." elsif @column.nil? "No query definition found for #{@klass}:#{@query_name}" else "Column `#{@column}` not found at `#{@klass} query:#{@query_name}` Query Definitions." end end |