summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-11-15 14:57:48 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-06 13:08:25 -0800
commitd218f942628da9a7302f1cc166abec0ea4fdeba2 (patch)
treeb9f0e7718379149c561a621562b24a0ccef6b386
parentdd8feda809f4396d4a802e483e84e19d2f5e9d9a (diff)
downloadchef-d218f942628da9a7302f1cc166abec0ea4fdeba2.tar.gz
fix Lint/InheritException
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/exceptions.rb10
-rw-r--r--spec/unit/exceptions_spec.rb2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index c933841726..71ea6ceb9a 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -76,10 +76,10 @@ class Chef
class Group < RuntimeError; end
class Link < RuntimeError; end
class Mount < RuntimeError; end
- class Reboot < Exception; end
- class RebootPending < Exception; end
+ class Reboot < Exception; end # rubocop:disable Lint/InheritException
+ class RebootPending < Exception; end # rubocop:disable Lint/InheritException
class RebootFailed < Mixlib::ShellOut::ShellCommandFailed; end
- class ClientUpgraded < Exception; end
+ class ClientUpgraded < Exception; end # rubocop:disable Lint/InheritException
class PrivateKeyMissing < RuntimeError; end
class CannotWritePrivateKey < RuntimeError; end
class RoleNotFound < RuntimeError; end
@@ -159,7 +159,7 @@ class Chef
# Thrown when Win32 API layer binds to non-existent Win32 function. Occurs
# when older versions of Windows don't support newer Win32 API functions.
- class Win32APIFunctionNotImplemented < NotImplementedError; end
+ class Win32APIFunctionNotImplemented < RuntimeError; end
# Attempting to run windows code on a not-windows node
class Win32NotWindows < RuntimeError; end
class WindowsNotAdmin < RuntimeError; end
@@ -196,7 +196,7 @@ class Chef
class InvalidVersionConstraint < ArgumentError; end
# Version constraints are not allowed in chef-solo
- class IllegalVersionConstraint < NotImplementedError; end
+ class IllegalVersionConstraint < ArgumentError; end
class MetadataNotValid < StandardError; end
class MetadataNotFound < StandardError
diff --git a/spec/unit/exceptions_spec.rb b/spec/unit/exceptions_spec.rb
index e952a5448a..9c599cac75 100644
--- a/spec/unit/exceptions_spec.rb
+++ b/spec/unit/exceptions_spec.rb
@@ -67,7 +67,7 @@ describe Chef::Exceptions do
Chef::Exceptions::InvalidEnvironmentPath => ArgumentError,
Chef::Exceptions::EnvironmentNotFound => RuntimeError,
Chef::Exceptions::InvalidVersionConstraint => ArgumentError,
- Chef::Exceptions::IllegalVersionConstraint => NotImplementedError,
+ Chef::Exceptions::IllegalVersionConstraint => RuntimeError,
Chef::Exceptions::RegKeyValuesTypeMissing => ArgumentError,
Chef::Exceptions::RegKeyValuesDataMissing => ArgumentError,
}