Phprest\Entity\Error::__construct PHP Method

__construct() public method

public __construct ( Exception $exception )
$exception Exception
    public function __construct(\Exception $exception)
    {
        $this->code = $exception->getCode();
        $this->message = $exception->getMessage();
        if ($exception instanceof Exception) {
            $this->details = $exception->getDetails();
        }
    }