lib/dropcaster/errors.rb in dropcaster-0.0.1 vs lib/dropcaster/errors.rb in dropcaster-0.0.2

- old
+ new

@@ -1,11 +1,19 @@ -class ConfigurationError < StandardError - def initialize(msg) - super(msg) +module Dropcaster + class ConfigurationError < StandardError + def initialize(msg) + super(msg) + end end -end -class MissingAttributeError < ConfigurationError - def initialize(missingAttribute) - super("#{missingAttribute} is a mantadory attribute, but it is missing.") + class MissingAttributeError < ConfigurationError + def initialize(missingAttribute) + super("#{missingAttribute} is a mandatory attribute, but it is missing.") + end + end + + class AmbiguousSourcesError < ConfigurationError + def initialize(ambiguousSources) + super("The list of sources is ambiguous. Can't derive common directory from these: #{ambiguousSources.inspect}") + end end end