Ouzo\ExceptionHandling\OuzoException::__construct PHP Method

__construct() public method

public __construct ( $httpCode, $errors, $headers = [] )
    public function __construct($httpCode, $errors, $headers = array())
    {
        $this->_httpCode = $httpCode;
        $this->_errors = Arrays::toArray($errors);
        $this->_headers = $headers;
        $firstError = Arrays::first($this->_errors);
        parent::__construct($firstError->getMessage(), $firstError->getCode());
    }

Usage Example

Example #1
0
 public function __construct($errors, $headers = array())
 {
     parent::__construct(self::HTTP_CODE, $errors, $headers);
 }
All Usage Examples Of Ouzo\ExceptionHandling\OuzoException::__construct