diff options
Diffstat (limited to 'lib/puppet/module.rb')
-rw-r--r-- | lib/puppet/module.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb index b0d80caa6..f30b862ef 100644 --- a/lib/puppet/module.rb +++ b/lib/puppet/module.rb @@ -2,20 +2,16 @@ require 'puppet/util/logging' # Support for modules class Puppet::Module - class MissingModule < Puppet::Error; end - class IncompatibleModule < Puppet::Error; end - class UnsupportedPlatform < Puppet::Error; end - class IncompatiblePlatform < Puppet::Error; end - class MissingMetadata < Puppet::Error; end + class Error < Puppet::Error; end + class MissingModule < Error; end + class IncompatibleModule < Error; end + class UnsupportedPlatform < Error; end + class IncompatiblePlatform < Error; end + class MissingMetadata < Error; end + class InvalidName < Error; end include Puppet::Util::Logging - class InvalidName < ArgumentError - def message - "Invalid module name; module names must be alphanumeric (plus '-')" - end - end - TEMPLATES = "templates" FILES = "files" MANIFESTS = "manifests" @@ -215,6 +211,6 @@ class Puppet::Module end def assert_validity - raise InvalidName unless name =~ /^[-\w]+$/ + raise InvalidName, "Invalid module name; module names must be alphanumeric (plus '-')" unless name =~ /^[-\w]+$/ end end |