Exception: Etna::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/etna/errors.rb

Direct Known Subclasses

BadRequest, Forbidden, NotFound, ServerError, Unauthorized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = 'The application had an error', status = 500) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
# File 'lib/etna/errors.rb', line 6

def initialize(msg = 'The application had an error', status=500)
  super(msg)
  @level = Logger::WARN
  @status = status
end

Instance Attribute Details

#levelObject (readonly)

Returns the value of attribute level.



5
6
7
# File 'lib/etna/errors.rb', line 5

def level
  @level
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/etna/errors.rb', line 5

def status
  @status
end