Exception: Brandish::LocationError Private
- Defined in:
- lib/brandish/errors.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This should never be used directly. This is an error that is tied to a location; as such, it provides an initalizer for providing a location.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#location ⇒ Location
readonly
private
The location of the error in a file.
Instance Method Summary collapse
-
#initialize(message, location = Location.default, bt = caller[1..-1]) ⇒ LocationError
constructor
private
Initialize the error with the given location and message.
Constructor Details
#initialize(message, location = Location.default, bt = caller[1..-1]) ⇒ LocationError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize the error with the given location and message.
34 35 36 37 38 |
# File 'lib/brandish/errors.rb', line 34 def initialize(, location = Location.default, bt = caller[1..-1]) @location = location super() set_backtrace(bt) end |
Instance Attribute Details
#location ⇒ Location (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The location of the error in a file.
31 32 33 |
# File 'lib/brandish/errors.rb', line 31 def location @location end |