public function handle()
    {
        if (! $this->is_ajax_request()) {
            return Handler::DONE;
        }

        $response = [
            'success' => false,
            'data'    => Formatter::formatExceptionAsDataArray($this->getInspector(), $this->addTraceToOutput()),
        ];

        if (Misc::canSendHeaders()) {
            \header('Content-Type: application/json; charset=' . get_option('blog_charset'));
        }

        echo wp_json_encode($response, JSON_PRETTY_PRINT);

        return Handler::QUIT;
    }
public function handle()
    {
        if (! $this->is_ajax_request()) {
            return Handler::DONE;
        }

        $response = [
            'success' => false,
            'data'    => Formatter::formatExceptionAsDataArray($this->getInspector(), $this->addTraceToOutput()),
        ];

        if (Misc::canSendHeaders()) {
            \header('Content-Type: application/json; charset=' . get_option('blog_charset'));
        }

        echo wp_json_encode($response, JSON_PRETTY_PRINT);

        return Handler::QUIT;
    }
public function handle ( ) { if ( ! $ this -> is_ajax_request ( ) ) { return Handler :: DONE ; } $ response = [ 'success' => false , 'data' => Formatter :: formatExceptionAsDataArray ( $ this -> getInspector ( ) , $ this -> addTraceToOutput ( ) ) , ] ; if ( Misc :: canSendHeaders ( ) ) { \ header ( 'Content-Type: application/json; charset=' . get_option ( 'blog_charset' ) ) ; } echo wp_json_encode ( $ response , JSON_PRETTY_PRINT ) ; return Handler :: QUIT ; }
The error handler. Send the error is the standard WordPress AJAX format.

@since 1.0.0

@return int
The error handler . Send the error is the standard WordPress AJAX format .