Exception: Glyph::MacroError
- Includes:
- Utils
- Defined in:
- lib/glyph.rb
Overview
A macro error.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#macro ⇒ Object
readonly
Returns the value of attribute macro.
Instance Method Summary collapse
-
#display ⇒ Object
Displays the error message, source, path and node value (if debugging).
-
#initialize(message, macro) ⇒ MacroError
constructor
Initializes a new Glyph::MacroError.
Methods included from Utils
#clean_xml_document, #complex_output?, #current_output_setting, #debug, #error, #file_copy, #file_load, #file_write, #info, #load_files_from_dir, #macro_alias?, #macro_aliases_for, #macro_definition_for, #macro_eq?, #msg, #multiple_output_files?, #project?, #run_external_command, #titled_sections, #warning, #with_files_from, #yaml_dump, #yaml_load
Constructor Details
#initialize(message, macro) ⇒ MacroError
Initializes a new Glyph::MacroError
57 58 59 60 |
# File 'lib/glyph.rb', line 57 def initialize(, macro) @macro = macro super() end |
Instance Attribute Details
#macro ⇒ Object (readonly)
Returns the value of attribute macro.
52 53 54 |
# File 'lib/glyph.rb', line 52 def macro @macro end |
Instance Method Details
#display ⇒ Object
Displays the error message, source, path and node value (if debugging)
63 64 65 66 67 68 |
# File 'lib/glyph.rb', line 63 def display warning exception. path = @macro.path.blank? ? "" : "\n path: #{@macro.path}" msg " source: #{@macro.source_name}#{path}" msg "#{"-"*54}\n#{@macro.node.to_s.gsub(/\t/, ' ')}\n#{"-"*54}" if Glyph.debug? end |