Exception: Artery::FormatError

Inherits:
Error
  • Object
show all
Defined in:
lib/artery/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#artery_context

Instance Method Summary collapse

Constructor Details

#initialize(route, msg, **context) ⇒ FormatError

Returns a new instance of FormatError.



37
38
39
40
41
42
# File 'lib/artery/errors.rb', line 37

def initialize(route, msg, **context)
  @route = route
  @msg = msg

  super(nil, **context)
end

Instance Attribute Details

#msgObject

Returns the value of attribute msg.



35
36
37
# File 'lib/artery/errors.rb', line 35

def msg
  @msg
end

#routeObject

Returns the value of attribute route.



35
36
37
# File 'lib/artery/errors.rb', line 35

def route
  @route
end

Instance Method Details

#messageObject



44
45
46
# File 'lib/artery/errors.rb', line 44

def message
  "Received message from #{route} in wrong format: #{msg}"
end