public function handleException(\Exception $exception) { if (is_callable($this->existingExceptionHandler)) { call_user_func($this->existingErrorHandler, $exception); } $this->printSolutions(Error::fromException($exception)); }
/** * @param Error $error * * @return Solutions */ public function storeError(Error $error) { $context = stream_context_create(array('http' => array('method' => 'POST', 'header' => "Content-type: application/json\r\n", 'content' => json_encode($error->toArray()), 'timeout' => $this->timeout, 'proxy' => $this->proxy))); $response = file_get_contents($this->endpoint, false, $context); return Solutions::fromResponse($response); }