Exception: Nanoc3::Errors::DataNotYetAvailable

Inherits:
Generic
  • Object
show all
Defined in:
lib/nanoc3/base/errors.rb

Overview

Error that is raised when data is requested when the data is not yet available (possibly due to a missing Site#load_data).

Instance Method Summary (collapse)

Constructor Details

- (DataNotYetAvailable) initialize(type, plural)

available. For example: "site", "items".

otherwise. This only has an effect on the exception message. For example, if the given type is "site", plural would be false; if the given type is "items", plural would be true.

Parameters:

  • type (String)

    The name of the data type that is not yet

  • plural (Boolean)

    True if the given type is plural, false



72
73
74
# File 'lib/nanoc3/base/errors.rb', line 72

def initialize(type, plural)
  super("#{type} #{plural ? 'are' : 'is'} not available yet. You may be missing a Nanoc3::Site#load_data call.".make_compatible_with_env)
end