Exception: MKBrut::Ops::PrismParsingOp::SourceNotParseable

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mkbrut/ops/prism_parsing_op.rb

Instance Method Summary collapse

Constructor Details

#initialize(tree_errors:, file:) ⇒ SourceNotParseable

Returns a new instance of SourceNotParseable.



20
21
22
23
24
25
# File 'lib/mkbrut/ops/prism_parsing_op.rb', line 20

def initialize(tree_errors:, file:)
  error_message = tree_errors.map { |error|
    "#{error.message} (line #{error.location.start_line}, column #{error.location.start_column})"
  }.join(", ")
  super("Failed to parse file '#{file}': #{error_message}")
end