Exception: Nanoc::Core::Errors::CompilationError

Inherits:
Nanoc::Core::Error show all
Defined in:
lib/nanoc/core/errors.rb

Overview

Error that is raised when compilation of an item rep fails. The underlying error is available by calling #unwrap.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wrapped, item_rep) ⇒ CompilationError

Returns a new instance of CompilationError.



35
36
37
38
39
40
# File 'lib/nanoc/core/errors.rb', line 35

def initialize(wrapped, item_rep)
  super(wrapped.message)

  @wrapped = wrapped
  @item_rep = item_rep
end

Instance Attribute Details

#item_repObject (readonly)

Returns the value of attribute item_rep.



33
34
35
# File 'lib/nanoc/core/errors.rb', line 33

def item_rep
  @item_rep
end

Instance Method Details

#unwrapObject



42
43
44
# File 'lib/nanoc/core/errors.rb', line 42

def unwrap
  @wrapped
end