Exception: Chef::ChefFS::FileSystem::FileSystemError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chef/chef_fs/file_system/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry, cause = nil, reason = nil) ⇒ FileSystemError

Returns a new instance of FileSystemError.

Parameters:

  • entry

    The entry which had an issue.

  • cause (defaults to: nil)

    The wrapped exception (if any).

  • reason (defaults to: nil)

    A string describing why this exception happened.



26
27
28
29
30
31
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 26

def initialize(entry, cause = nil, reason = nil)
  super(reason)
  @entry = entry
  @cause = cause
  @reason = reason
end

Instance Attribute Details

#causeObject (readonly)

The wrapped exception (if any).



37
38
39
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 37

def cause
  @cause
end

#entryObject (readonly)

The entry which had an issue.



34
35
36
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 34

def entry
  @entry
end

#reasonObject (readonly)

A string describing why this exception happened.



40
41
42
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 40

def reason
  @reason
end