private function triggerError($error, Http\Request $request, Http\Response $response)
    {
        if (! isset($this->options['onerror'])
            || ! is_callable($this->options['onerror'])
        ) {
            return;
        }

        $onError = $this->options['onerror'];
        $onError($error, $request, $response);
    }
private function triggerError($error, Http\Request $request, Http\Response $response)
    {
        if (! isset($this->options['onerror'])
            || ! is_callable($this->options['onerror'])
        ) {
            return;
        }

        $onError = $this->options['onerror'];
        $onError($error, $request, $response);
    }
private function triggerError ( $ error , Http \ Request $ request , Http \ Response $ response ) { if ( ! isset ( $ this -> options [ 'onerror' ] ) || ! is_callable ( $ this -> options [ 'onerror' ] ) ) { return ; } $ onError = $ this -> options [ 'onerror' ] ; $ onError ( $ error , $ request , $ response ) ; }
Trigger the error listener, if present

@param mixed $error
@param Http\Request $request
@param Http\Response $response
Trigger the error listener if present