Exception: Eco::API::UseCases::BaseCase::InvalidType

Inherits:
Exception
  • Object
show all
Defined in:
lib/eco/api/usecases/base_case.rb

Instance Method Summary collapse

Methods inherited from Exception

#patch_full_message

Constructor Details

#initialize(msg = nil, type:, types:) ⇒ InvalidType

Returns a new instance of InvalidType.



8
9
10
11
12
# File 'lib/eco/api/usecases/base_case.rb', line 8

def initialize(msg = nil, type:, types:)
  msg ||= "Invalid type."
  msg = "Given type '#{type}'. Valid types: #{types}"
  super(msg)
end