Exception: Chef::ChefFS::FileSystem::OperationNotAllowedError
- Inherits:
-
FileSystemError
- Object
- StandardError
- FileSystemError
- Chef::ChefFS::FileSystem::OperationNotAllowedError
- Defined in:
- lib/chef/chef_fs/file_system/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
Attributes inherited from FileSystemError
Instance Method Summary collapse
-
#initialize(operation, entry, cause = nil, reason = nil) ⇒ OperationNotAllowedError
constructor
A new instance of OperationNotAllowedError.
Constructor Details
#initialize(operation, entry, cause = nil, reason = nil) ⇒ OperationNotAllowedError
Returns a new instance of OperationNotAllowedError.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 65 def initialize(operation, entry, cause = nil, reason = nil) reason ||= case operation when :delete "cannot be deleted" when :write "cannot be updated" when :create_child "cannot have a child created under it" when :read "cannot be read" end super(entry, cause, reason) @operation = operation end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
82 83 84 |
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 82 def entry @entry end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
81 82 83 |
# File 'lib/chef/chef_fs/file_system/exceptions.rb', line 81 def operation @operation end |