lib/cupcakinator/errors.rb in cupcakinator-0.0.4 vs lib/cupcakinator/errors.rb in cupcakinator-1.0.0

- old
+ new

@@ -1,6 +1,20 @@ module Cupcakinator - class ConfigFileNotFoundError < StandardError; end - class ConfigFileInvalidError < StandardError; end + class ConfigFileNotFoundError < StandardError + + def initialize(filename, options) + super I18n.t('error.config_not_found', filename: filename, options: options) + end + + end + + + class ConfigFileInvalidError < StandardError + + def initialize(filename, message) + super I18n.t('error.config_invalid', filename: filename, message: message) + end + + end end \ No newline at end of file