Automattic\WooCommerce\Api

ValidationException::__constructpublicWC 1.0

Constructor.

Method of the class: ValidationException{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ValidationException = new ValidationException();
$ValidationException->__construct( $message, $extensions, ?\Throwable $previous,  );
$message(string)
The error message.
Default: 'Validation failed.'
$extensions(array)
Additional error metadata to surface in the GraphQL extensions object.
Default: array()
?\Throwable $previous

.
Default: null

(required)

.

ValidationException::__construct() code WC 10.9.1

public function __construct(
	string $message = 'Validation failed.',
	array $extensions = array(),
	?\Throwable $previous = null,
) {
	parent::__construct( $message, 'VALIDATION_ERROR', $extensions, 422, $previous );
}