Exception: Liminal::UnsupportedNodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/liminal/errors.rb

Overview

Raised when a dry-schema AST node cannot be represented.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_name:, path:, operation:) ⇒ UnsupportedNodeError

Returns a new instance of UnsupportedNodeError.



22
23
24
25
26
27
28
# File 'lib/liminal/errors.rb', line 22

def initialize(source_name:, path:, operation:)
  @source_name = source_name
  @path = path.map { |segment| segment.to_s.dup.freeze }.freeze
  @operation = operation
  super("Cannot compile #{source_name} at #{Path.display(path)}: " \
        "unsupported AST node #{operation}.")
end

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



20
21
22
# File 'lib/liminal/errors.rb', line 20

def operation
  @operation
end

#pathObject (readonly)

Returns the value of attribute path.



20
21
22
# File 'lib/liminal/errors.rb', line 20

def path
  @path
end

#source_nameObject (readonly)

Returns the value of attribute source_name.



20
21
22
# File 'lib/liminal/errors.rb', line 20

def source_name
  @source_name
end