Exception: Optimistic::Json::Parser::InvalidToken
- Inherits:
-
StandardError
- Object
- StandardError
- Optimistic::Json::Parser::InvalidToken
- Defined in:
- lib/optimistic/json/parser.rb
Overview
Raised when a supported token is found, but is invali
Instance Method Summary collapse
-
#initialize(tokens:, msg: nil) ⇒ InvalidToken
constructor
A new instance of InvalidToken.
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 |