Automattic\WooCommerce\Api

NotFoundException::__constructpublicWC 1.0

Constructor.

Method of the class: NotFoundException{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

.
Default: null

(required)

.

NotFoundException::__construct() code WC 10.9.1

public function __construct(
	string $message = 'Resource not found.',
	array $extensions = array(),
	?\Throwable $previous = null,
) {
	parent::__construct( $message, 'NOT_FOUND', $extensions, 404, $previous );
}