Exception: DIY::ConstructionError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/diy.rb

Overview

:nodoc:#

Instance Method Summary collapse

Constructor Details

#initialize(object_name, cause = nil) ⇒ ConstructionError

Returns a new instance of ConstructionError.



379
380
381
382
383
384
385
386
387
# File 'lib/diy.rb', line 379

def initialize(object_name, cause=nil)
  object_name = object_name
  cause = cause
  m = "Failed to construct '#{object_name}'"
  if cause 
    m << "\n  ...caused by:\n  >>> #{cause}"
  end
  super m
end