Exception: ChefApply::TextWrapper::InvalidKey
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ChefApply::TextWrapper::InvalidKey
- Defined in:
- lib/chef_apply/text.rb
Instance Method Summary collapse
-
#initialize(path, terminus) ⇒ InvalidKey
constructor
A new instance of InvalidKey.
Constructor Details
#initialize(path, terminus) ⇒ InvalidKey
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/chef_apply/text.rb', line 60 def initialize(path, terminus) line = caller(3, 1).first # 1 - TextWrapper.method_missing # 2 - TextWrapper.initialize # 3 - actual caller if line =~ /.*\/lib\/(.*\.rb):(\d+)/ line = "File: #{$1} Line: #{$2}" end # Calling back into Text here seems icky, this is an error # that only engineering should see. = "i18n key #{path}.#{terminus} does not exist.\n" << "Referenced from #{line}" super() end |