WP_Customize_Selective_Refresh::handle_error()publicWP 4.5.0

Handles PHP errors triggered during rendering the partials.

These errors will be relayed back to the client in the Ajax response.

Method of the class: WP_Customize_Selective_Refresh{}

No Hooks.

Return

true. Always true.

Usage

$WP_Customize_Selective_Refresh = new WP_Customize_Selective_Refresh();
$WP_Customize_Selective_Refresh->handle_error( $errno, $errstr, $errfile, $errline );
$errno(int) (required)
Error number.
$errstr(string) (required)
Error string.
$errfile(string)
Error file.
Default: null
$errline(int)
Error line.
Default: null

Changelog

Since 4.5.0 Introduced.

WP_Customize_Selective_Refresh::handle_error() code WP 6.5.2

public function handle_error( $errno, $errstr, $errfile = null, $errline = null ) {
	$this->triggered_errors[] = array(
		'partial'      => $this->current_partial_id,
		'error_number' => $errno,
		'error_string' => $errstr,
		'error_file'   => $errfile,
		'error_line'   => $errline,
	);
	return true;
}