summaryrefslogtreecommitdiff
path: root/lib/chef/exceptions.rb
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-03 09:58:18 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-03 09:58:18 -0800
commitb74d0028914b03bce785b940f0cad5390444ae3a (patch)
treebf1e75773bae697cd469f5e560440e2fd0b5e1c5 /lib/chef/exceptions.rb
parentab63cd4be967b5d01f6ec856244e4b9af4e896d9 (diff)
downloadchef-b74d0028914b03bce785b940f0cad5390444ae3a.tar.gz
fixes #4515 and use FormatMessage to get correct error messages from native API instead of retyping them with our fingersinvalid
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r--lib/chef/exceptions.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index 6a0cdb9b95..9a2e9ae3a3 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -138,22 +138,6 @@ class Chef
# Errors originating from calls to the Win32 API
class Win32APIError < RuntimeError; end
- class Win32NetAPIError < Win32APIError
- attr_reader :msg, :error_code
- def initialize(msg, error_code)
- @msg = msg
- @error_code = error_code
-
- formatted_message = ""
- formatted_message << "---- Begin Win32 API output ----\n"
- formatted_message << "Net Api Error Code: #{error_code}\n"
- formatted_message << "Net Api Error Message: #{msg}\n"
- formatted_message << "---- End Win32 API output ----\n"
-
- super(formatted_message)
- end
- end
-
# 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