<?php declare(strict_types=1);
namespace GraphQL\Error;
use GraphQL\Language\AST\Node;
use GraphQL\Language\Source;
class Error extends \Exception
{
/**
* @param iterable<array-key, Node|null>|Node|null $nodes
* @param array<int, int>|null $positions
* @param list<int|string>|null $path
* @param array<string, mixed>|null $extensions
* @param list<int|string>|null $unaliasedPath
*/
public function __construct(
string $message = '',
$nodes = null,
?Source $source = null,
?array $positions = null,
?array $path = null,
?\Throwable $previous = null,
?array $extensions = null,
?array $unaliasedPath = null
) {
parent::__construct($message, 0, $previous);
}
}
try {
throw new \InvalidArgumentException('foo');
} catch (\InvalidArgumentException $e) {
throw new Error(message: 'Some error message', previous: $e);
}
No change.