Exception: ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Error::Exceptions::BothArgsAndKwargsArePassed

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/has_j_send_result_short_syntax/error/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_without_argumentsvoid

This method returns an undefined value.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/convenient_service/service/plugins/has_j_send_result_short_syntax/error/exceptions.rb', line 13

def initialize_without_arguments
  message = <<~TEXT
    Both `args` and `kwargs` are passed to the `error` method.

    Did you mean something like:

    error("Helpful text")
    error("Helpful text", :descriptive_code)

    error(message: "Helpful text")
    error(message: "Helpful text", code: :descriptive_code)
  TEXT

  initialize(message)
end