# encoding: utf-8
moduleNanoc3moduleErrors# Generic error. Superclass for all nanoc-specific errors.
classGeneric< ::StandardErrorend# Error that is raised when a site is loaded that uses a data source with
# an unknown identifier.
classUnknownDataSource< Genericdefinitialize(data_source_name)super("The data source specified in the site's configuration file, #{data_source_name}, does not exist.")endend# Error that is raised during site compilation when an item uses a layout
# that is not present in the site.
classUnknownLayout< Genericdefinitialize(layout_identifier)super("The site does not have a layout with identifier '#{layout_identifier}'.")endend# Error that is raised during site compilation when an item uses a filter
# that is not known.
classUnknownFilter< Genericdefinitialize(filter_name)super("The requested filter, #{filter_name}, does not exist.")endend# Error that is raised during site compilation when a layout is compiled
# for which the filter cannot be determined. This is similar to the
# UnknownFilterError, but specific for filters for layouts.
classCannotDetermineFilter< Genericdefinitialize(layout_identifier)super("The filter to be used for the '#{layout_identifier}' could not be determined. Make sure the layout does have a filter.")endend# Error that is raised when data is requested when the data is not yet
# available (possibly due to a missing Nanoc::Site#load_data).
classDataNotYetAvailable< Genericdefinitialize(type, plural)super("#{type}#{plural ?'are':'is'} not available yet. You may be missing a Nanoc::Site#load_data call.")endend# Error that is raised during site compilation when an item (directly or
# indirectly) includes its own item content, leading to endless recursion.
classRecursiveCompilation< Genericdefinitialize(reps)super("The site cannot be compiled because the following items mutually depend on each other: #{reps.inspect}.")endend# Error that is raised when no rules file can be found in the current
# working directory.
classNoRulesFileFound< Genericdefinitializesuper("This site does not have a rules file, which is required for nanoc sites.")endend# Error that is raised when no compilation rule that can be applied to the
# current item can be found.
classNoMatchingCompilationRuleFound< Genericdefinitialize(rep)super("No compilation rules were found for the '#{rep.item.identifier}' item (rep '#{rep.name}').")endend# Error that is raised when no routing rule that can be applied to the
# current item can be found.
classNoMatchingRoutingRuleFound< Genericdefinitialize(rep)super("No routing rules were found for the '#{rep.item.identifier}' item (rep '#{rep.name}').")endend# Error that is raised when an rep cannot be compiled because it depends on other representations.
classUnmetDependency< Genericattr_reader:repdefinitialize(rep)@rep= rep
super("The '#{rep.item.identifier}' item (rep '#{rep.name}') cannot currently be compiled yet due to an unmet dependency.")endendendend