Exception: Mediate::Errors::RequestHandlerAlreadyExistsError

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

Overview

Indicates that a Mediate::RequestHandler was already registered for the given request_class.

Instance Method Summary collapse

Constructor Details

#initialize(request_class, registered_handler_class, attempted_handler_class) ⇒ RequestHandlerAlreadyExistsError

Returns a new instance of RequestHandlerAlreadyExistsError.



12
13
14
15
16
# File 'lib/mediate/errors/request_handler_already_exists_error.rb', line 12

def initialize(request_class, registered_handler_class, attempted_handler_class)
  super("Attempted to register #{attempted_handler_class} to handle #{request_class},\
    but #{registered_handler_class} is already registered to handle #{request_class}.\
    This is probably a mistake, as only one handler should be registered per request type.")
end