Exception: RubyQuery::QueryError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, name, type, param, msg) ⇒ QueryError

Returns a new instance of QueryError.



6
7
8
9
10
11
12
# File 'lib/ruby_query.rb', line 6

def initialize(context, name, type, param, msg)
  @context = context
  @command_name = name
  @command_type = type
  @param = param
  @message = msg
end

Instance Attribute Details

#command_nameObject

Returns the value of attribute command_name.



5
6
7
# File 'lib/ruby_query.rb', line 5

def command_name
  @command_name
end

#command_typeObject

Returns the value of attribute command_type.



5
6
7
# File 'lib/ruby_query.rb', line 5

def command_type
  @command_type
end

#contextObject

Returns the value of attribute context.



5
6
7
# File 'lib/ruby_query.rb', line 5

def context
  @context
end

#messageObject

Returns the value of attribute message.



5
6
7
# File 'lib/ruby_query.rb', line 5

def message
  @message
end

#paramObject

Returns the value of attribute param.



5
6
7
# File 'lib/ruby_query.rb', line 5

def param
  @param
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/ruby_query.rb', line 14

def to_s
  "#{command_type}:#{command_name} param=#{param}, message=#{message}"
end