WordPress at Your Fingertips
function is not described

WC_Abstract_Order::handle_exception() protected WC 3.7.0

Log an error about this order is exception is encountered.

{} It's a method of the class: WC_Abstract_Order{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->handle_exception( $e, $message );
$e(Exception) (required)
Exception object.
$message(string)
Message regarding exception thrown.
Default: 'Error'

Changelog

Since 3.7.0 Introduced.

Code of WC_Abstract_Order::handle_exception() WC 5.9.0

protected function handle_exception( $e, $message = 'Error' ) {
	wc_get_logger()->error(
		$message,
		array(
			'order' => $this,
			'error' => $e,
		)
	);
}