lib/i18n/exceptions.rb in i18n-0.6.1 vs lib/i18n/exceptions.rb in i18n-0.6.2

- old
+ new

@@ -27,13 +27,13 @@ end end class InvalidLocaleData < ArgumentError attr_reader :filename - def initialize(filename) - @filename = filename - super "can not load translations from #{filename}, expected it to return a hash, but does not" + def initialize(filename, exception_message) + @filename, @exception_message = filename, exception_message + super "can not load translations from #{filename}: #{exception_message}" end end class MissingTranslation module Base @@ -79,13 +79,13 @@ super "translation data #{entry.inspect} can not be used with :count => #{count}" end end class MissingInterpolationArgument < ArgumentError - attr_reader :values, :string - def initialize(values, string) - @values, @string = values, string - super "missing interpolation argument in #{string.inspect} (#{values.inspect} given)" + attr_reader :key, :values, :string + def initialize(key, values, string) + @key, @values, @string = key, values, string + super "missing interpolation argument #{key.inspect} in #{string.inspect} (#{values.inspect} given)" end end class ReservedInterpolationKey < ArgumentError attr_reader :key, :string