Exception: Yoga::UnexpectedTokenError Private

Inherits:
ParseError show all
Defined in:
lib/yoga/errors.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

An unexpected token was encountered while parsing.

Instance Attribute Summary

Attributes inherited from LocationError

#location

Instance Method Summary collapse

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from Yoga::Error

Instance Method Details

#generate_message::String (private)

Generates a message for the exception.

Returns:

  • (::String)


61
62
63
64
# File 'lib/yoga/errors.rb', line 61

private def generate_message
  "Unexpected #{@got}, expected one of #{@expected.to_a.join(', ')} " \
    "at #{@location}"
end