Exception: Semantics3::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/semantics3.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.



285
286
287
288
# File 'lib/semantics3.rb', line 285

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.



282
283
284
# File 'lib/semantics3.rb', line 282

def message
  @message
end

#paramObject (readonly)

Returns the value of attribute param.



283
284
285
# File 'lib/semantics3.rb', line 283

def param
  @param
end

#typeObject (readonly)

Returns the value of attribute type.



281
282
283
# File 'lib/semantics3.rb', line 281

def type
  @type
end