Exception: Flexr::Error

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

Direct Known Subclasses

CompileError, FrozenSpecificationError, LexError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, diagnostic: nil) ⇒ Error

Returns a new instance of Error.



7
8
9
10
# File 'lib/flexr/errors.rb', line 7

def initialize(message = nil, diagnostic: nil)
  @diagnostic = diagnostic
  super(message || diagnostic&.message)
end

Instance Attribute Details

#diagnosticObject (readonly)

Returns the value of attribute diagnostic.



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

def diagnostic
  @diagnostic
end