Exception: TaskHelper::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/puppet/util/task_helper.rb

Overview

Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, kind, details = nil) ⇒ Error

Returns a new instance of Error.



22
23
24
25
26
27
# File 'lib/puppet/util/task_helper.rb', line 22

def initialize(msg, kind, details = nil)
  super(msg)
  @kind = kind
  @issue_code = issue_code
  @details = details || {}
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



20
21
22
# File 'lib/puppet/util/task_helper.rb', line 20

def details
  @details
end

#issue_codeObject (readonly)

Returns the value of attribute issue_code.



20
21
22
# File 'lib/puppet/util/task_helper.rb', line 20

def issue_code
  @issue_code
end

#kindObject (readonly)

Returns the value of attribute kind.



20
21
22
# File 'lib/puppet/util/task_helper.rb', line 20

def kind
  @kind
end

Instance Method Details

#to_hObject



29
30
31
32
33
# File 'lib/puppet/util/task_helper.rb', line 29

def to_h
  { 'kind' => kind,
    'msg' => message,
    'details' => details }
end