| Server IP : 145.239.37.162 / Your IP : 216.73.217.126 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www1/wp-content/themes/transpix/woocommerce/includes/cli/ |
Upload File : |
<?php
/**
* WooCommerce CLI Exception Class.
*
* Extends Exception to provide additional data.
*
* @since 2.5.0
* @package WooCommerce/CLI
* @category CLI
* @author WooThemes
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class WC_CLI_Exception extends Exception {
/** @var string sanitized error code */
protected $error_code;
/**
* Setup exception, requires 3 params:
*
* error code - machine-readable, e.g. `woocommerce_invalid_product_id`
* error message - friendly message, e.g. 'Product ID is invalid'
*
* @since 2.5.0
* @param string $error_code
* @param string $error_message user-friendly translated error message
*/
public function __construct( $error_code, $error_message ) {
$this->error_code = $error_code;
parent::__construct( $error_message );
}
/**
* Returns the error code
*
* @since 2.5.0
* @return string
*/
public function getErrorCode() {
return $this->error_code;
}
}