/**
  * Construct a new unsupported attribute exception.
  *
  * @param string    $typeName  The type name.
  * @param string    $attribute The attribute.
  * @param integer   $offset    The offset.
  * @param Exception $cause     The cause, if available.
  */
 public function __construct($typeName, $attribute, $offset, Exception $cause = null)
 {
     $this->typeName = $typeName;
     $this->attribute = $attribute;
     $message = 'Unsupported attribute at offset ' . $offset . ". Type '" . $typeName . "' does not support attribute '" . $attribute . "'.";
     parent::__construct($message, $offset, $cause);
 }
 /**
  * Construct a new unexpected token exception.
  *
  * @param string        $unexpected The unexpected token name.
  * @param integer       $offset     The offset.
  * @param array<string> $expected   The list of expected token names.
  * @param Exception     $cause      The cause, if available.
  */
 public function __construct($unexpected, $offset, array $expected, Exception $cause = null)
 {
     $this->unexpected = $unexpected;
     $this->expected = $expected;
     if (count($expected) > 1) {
         $expected = 'one of ' . implode(', ', $expected);
     } else {
         $expected = array_pop($expected);
     }
     $message = 'Unexpected ' . $unexpected . ' at offset ' . $offset . '. Expected ' . $expected . '.';
     parent::__construct($message, $offset, $cause);
 }