Exception: Optimistic::Json::Parser::InvalidToken

Inherits:
StandardError
  • Object
show all
Defined in:
lib/optimistic/json/parser.rb

Overview

Raised when a supported token is found, but is invali

Instance Method Summary collapse

Constructor Details

#initialize(tokens:, msg: nil) ⇒ InvalidToken

Returns a new instance of InvalidToken.



23
24
25
26
# File 'lib/optimistic/json/parser.rb', line 23

def initialize(tokens:, msg: nil)
  super(msg || "Unknown token starting with `#{tokens[0]}`: #{tokens}")
  @tokens = tokens
end