LLMS_Abstract_API_Handler::set_error( string $message, string $type, object $obj )
Set an Error Sets all error variables and sets the result as a WP_Error so the result can always be tested with is_wp_error()
Parameters Parameters
- $message
-
(string) (Required) error message
- $type
-
(string) (Required) error code or type
- $obj
-
(object) (Required) full error object or api response
Return Return
(void)
Source Source
File: includes/abstracts/llms.abstract.api.handler.php
protected function set_error( $message, $type, $obj ) {
$this->result = new WP_Error( $type, $message, $obj );
$this->error_type = $type;
$this->error_message = $message;
$this->error_object = $obj;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.11.2 | Introduced. |