summaryrefslogtreecommitdiffstats
path: root/lib/puppet/server/fileserver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/server/fileserver.rb')
-rwxr-xr-xlib/puppet/server/fileserver.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb
index 85f0f5016..8033fac5b 100755
--- a/lib/puppet/server/fileserver.rb
+++ b/lib/puppet/server/fileserver.rb
@@ -245,7 +245,7 @@ class Server
name = $1
if newmounts.include?(name)
raise FileServerError, "%s is already mounted at %s" %
- [newmounts[name], name]
+ [newmounts[name], name], count, @config.file
end
mount = Mount.new(name)
newmounts[name] = mount
@@ -267,8 +267,8 @@ class Server
mount.info "allowing %s access" % val
mount.allow(val)
rescue AuthStoreError => detail
- raise FileServerError, "%s at line %s of %s" %
- [detail.to_s, count, @config]
+ raise FileServerError.new(detail.to_s,
+ count, @config.file)
end
}
when "deny":
@@ -277,16 +277,17 @@ class Server
mount.info "denying %s access" % val
mount.deny(val)
rescue AuthStoreError => detail
- raise FileServerError, "%s at line %s of %s" %
- [detail.to_s, count, @config]
+ raise FileServerError.new(detail.to_s,
+ count, @config.file)
end
}
else
- raise FileServerError,
- "Invalid argument '%s' at line %s" % [var, count]
+ raise FileServerError.new("Invalid argument '%s'" % var,
+ count, @config.file)
end
else
- raise FileServerError, "Invalid line %s: %s" % [count, line]
+ raise FileServerError.new("Invalid line '%s'" % line.chomp,
+ count, @config.file)
end
count += 1
}