Exception: Errawr::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/errawr/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key = :unknown, context = {}) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
11
# File 'lib/errawr/error.rb', line 5

def initialize(key = :unknown, context = {})
  @key = key
  @i18n = I18n.t('errawr.' + @key.to_s)
  process_context(context)
  (context)
  process_message
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



3
4
5
# File 'lib/errawr/error.rb', line 3

def context
  @context
end

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'lib/errawr/error.rb', line 3

def key
  @key
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/errawr/error.rb', line 3

def message
  @message
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3
4
5
# File 'lib/errawr/error.rb', line 3

def 
  @metadata
end