Exception: WolfCore::ServiceException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/wolf_core/application/service_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ ServiceException

Returns a new instance of ServiceException.



5
6
7
8
9
10
# File 'lib/wolf_core/application/service_exception.rb', line 5

def initialize(error)
  @error = OpenStruct.new(
    { message: 'error' }.merge(error)
  )
  super(@error[:message])
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/wolf_core/application/service_exception.rb', line 3

def error
  @error
end