Exception: StandardExceptions::Exception

Inherits:
StandardError
  • Object
show all
Includes:
ExceptionInterface
Defined in:
lib/standard_exceptions.rb

Overview

messages are based on httpstatuses.com

Constant Summary collapse

MESSAGE =
'An error occurred that could not be identified'
STATUS =
500

Instance Attribute Summary

Attributes included from ExceptionInterface

#inner, #status

Instance Method Summary collapse

Methods included from ExceptionInterface

human_name, #human_name

Constructor Details

#initialize(message = nil, status = nil, inner = nil) ⇒ Exception

Returns a new instance of Exception.



33
34
35
36
37
# File 'lib/standard_exceptions.rb', line 33

def initialize(message=nil,status=nil,inner=nil)
  super(message || self.class::MESSAGE)
  @status = (status || self.class::STATUS)
  @inner = inner
end