summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-07-29 15:38:45 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-07-29 15:38:45 -0700
commit3519f13ad7cb7bb582198185cb0bc470330fb866 (patch)
tree8352dd0f0b1303b6dbc7ca3ca72bb174aca48415 /lib/chef/util
parent66146d5352fd59b8e1f81370e40004f423a55699 (diff)
downloadchef-3519f13ad7cb7bb582198185cb0bc470330fb866.tar.gz
Add Win32NetAPIError exception class
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/windows/net_group.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 9e7d3cbc36..30c32cbc65 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -83,8 +83,8 @@ class Chef::Util::Windows::NetGroup < Chef::Util::Windows
def local_add
begin
Chef::ReservedNames::Win32::NetUser::net_local_group_add(nil, @groupname)
- rescue Chef::Exceptions::Win32APIError => e
- raise ArgumentError, e
+ rescue Chef::Exceptions::Win32NetAPIError => e
+ raise ArgumentError, e.msg
end
end
@@ -103,8 +103,8 @@ class Chef::Util::Windows::NetGroup < Chef::Util::Windows
def local_delete
begin
Chef::ReservedNames::Win32::NetUser::net_local_group_del(nil, @groupname)
- rescue Chef::Exceptions::Win32APIError => e
- raise ArgumentError, e
+ rescue Chef::Exceptions::Win32NetAPIError => e
+ raise ArgumentError, e.msg
end
end
end