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.


true. Always true.


$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.
Error file.
Default: null
Error line.
Default: null


Since 4.5.0 Introduced.

WP_Customize_Selective_Refresh::handle_error() code WP 6.3

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;