Exception: Ast::Merge::TemplateParseError

Inherits:
ParseError show all
Defined in:
lib/ast/merge.rb

Overview

Raised when the template file has syntax errors.

Template files are the “source of truth” that destination files are merged against. When a template cannot be parsed, the merge operation cannot proceed.

Examples:

Handling template parse errors

begin
  merger = SmartMerger.new(template, destination)
rescue Ast::Merge::TemplateParseError => e
  puts "Template syntax error: #{e.message}"
  e.errors.each { |error| puts "  #{error.message}" }
end

Instance Attribute Summary

Attributes inherited from ParseError

#content, #errors

Method Summary

Methods inherited from ParseError

#initialize

Constructor Details

This class inherits a constructor from Ast::Merge::ParseError