Exception: UsefullAttachment::CustomError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/usefull_attachment/exceptions.rb

Direct Known Subclasses

Links::FileDuplicate

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CustomError

Returns a new instance of CustomError.



5
6
7
8
# File 'lib/usefull_attachment/exceptions.rb', line 5

def initialize(*args)
    @options = args.extract_options!
    super
end

Instance Method Details

#messageObject



10
11
12
13
# File 'lib/usefull_attachment/exceptions.rb', line 10

def message
  @options.merge!({:default => "Error : #{@options.inspect}"})
  I18n.t("#{self.class.name.gsub(/::/,'.')}", @options )
end