Automattic\WooCommerce\StoreApi\Routes\V1\Agentic

Error::__constructprivateWC 1.0

Constructor.

Method of the class: Error{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->__construct( $type, $code, $message, $param );
$type(string) (required)
Error type from ErrorType enum.
$code(string) (required)
Implementation-defined error code.
$message(string) (required)
Human-readable error message.
$param(string|null)
RFC 9535 JSONPath (optional).
Default: null

Error::__construct() code WC 10.7.0

private function __construct( $type, $code, $message, $param = null ) {
	$this->type    = $type;
	$this->code    = $code;
	$this->message = $message;
	$this->param   = $param;
}