Exception: Pricesphere::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, message = nil, param = nil) ⇒ Error

Returns a new instance of Error.



7
8
9
10
# File 'lib/pricesphere/error.rb', line 7

def initialize(type=nil, message=nil, param=nil)
    @message = 'Error: ' + type + ' Message: ' + message
    @message += ' Failed at parameter: ' + param if not param.nil?
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/pricesphere/error.rb', line 4

def message
  @message
end

#paramObject (readonly)

Returns the value of attribute param.



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

def param
  @param
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/pricesphere/error.rb', line 3

def type
  @type
end