diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 15:38:45 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 15:38:45 -0700 |
commit | 3519f13ad7cb7bb582198185cb0bc470330fb866 (patch) | |
tree | 8352dd0f0b1303b6dbc7ca3ca72bb174aca48415 /lib/chef/win32/net.rb | |
parent | 66146d5352fd59b8e1f81370e40004f423a55699 (diff) | |
download | chef-3519f13ad7cb7bb582198185cb0bc470330fb866.tar.gz |
Add Win32NetAPIError exception class
Diffstat (limited to 'lib/chef/win32/net.rb')
-rw-r--r-- | lib/chef/win32/net.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb index 29a2bb2244..18a26d92bc 100644 --- a/lib/chef/win32/net.rb +++ b/lib/chef/win32/net.rb @@ -97,13 +97,7 @@ END "Received unknown error code (#{code})" end - formatted_message = "" - formatted_message << "---- Begin Win32 API output ----\n" - formatted_message << "Net Api Error Code: #{code}\n" - formatted_message << "Net Api Error Message: #{msg}\n" - formatted_message << "---- End Win32 API output ----\n" - - raise Chef::Exceptions::Win32APIError, msg + "\n" + formatted_message + raise Chef::Exceptions::Win32NetAPIError.new(msg, code) end def self.net_local_group_add(server_name, group_name) |