Exception: StaticTracing::Tracepoint::InvalidArgumentError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby-static-tracing/tracepoint.rb

Instance Method Summary collapse

Constructor Details

#initialize(argument, expected_type) ⇒ InvalidArgumentError

Returns a new instance of InvalidArgumentError.



6
7
8
9
10
11
12
13
14
# File 'lib/ruby-static-tracing/tracepoint.rb', line 6

def initialize(argument, expected_type)
  error_message = <<~ERROR_MESSAGE

    We expected the fire arguments to match with the ones specified on the creation of the Tracepoint

    You passed #{argument} => #{argument.class} and we expected the argument to be type #{expected_type}
  ERROR_MESSAGE
  super(error_message)
end