示例#1
0
 public function handleException(\Exception $exception)
 {
     if (is_callable($this->existingExceptionHandler)) {
         call_user_func($this->existingErrorHandler, $exception);
     }
     $this->printSolutions(Error::fromException($exception));
 }
示例#2
0
 /**
  * @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);
 }