Exception: RgGen::Core::RgGenError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rggen/core/exceptions.rb

Direct Known Subclasses

BuilderError, PluginError, RuntimeError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, location_info = nil, verbose_info = nil) ⇒ RgGenError

Returns a new instance of RgGenError.



6
7
8
9
10
11
# File 'lib/rggen/core/exceptions.rb', line 6

def initialize(message, location_info = nil, verbose_info = nil)
  super(message)
  @error_message = message
  @location_info = location_info
  @verbose_info = verbose_info
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message.



13
14
15
# File 'lib/rggen/core/exceptions.rb', line 13

def error_message
  @error_message
end

#location_infoObject (readonly)

Returns the value of attribute location_info.



14
15
16
# File 'lib/rggen/core/exceptions.rb', line 14

def location_info
  @location_info
end

#verbose_infoObject (readonly)

Returns the value of attribute verbose_info.



15
16
17
# File 'lib/rggen/core/exceptions.rb', line 15

def verbose_info
  @verbose_info
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/rggen/core/exceptions.rb', line 17

def to_s
  location_info && "#{super} -- #{location_info}" || super
end