graphql-php/src/Error/SyntaxError.php
2018-06-19 19:50:12 +02:00

26 lines
471 B
PHP

<?php
declare(strict_types=1);
namespace GraphQL\Error;
use GraphQL\Language\Source;
use function sprintf;
class SyntaxError extends Error
{
/**
* @param int $position
* @param string $description
*/
public function __construct(Source $source, $position, $description)
{
parent::__construct(
sprintf('Syntax Error: %s', $description),
null,
$source,
[$position]
);
}
}