for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Polidog\Esa\Exception;
class ClientException extends \RuntimeException
{
/**
* @var string
*/
private $method;
private $path;
* @var array
private $params;
* @return string
public function getMethod()
return $this->method;
}
public function getPath()
return $this->path;
* @return array
public function getParams()
return $this->params;
* @param $method
* @param $path
*
* @return ClientException
public static function newException(\Exception $e, $method, $path, array $params)
$self = new self(sprintf('Api method error: %s : %s', $method, $path), $e->getCode(), $e);
$self->method = $method;
$self->path = $path;
$self->params = $params;
return $self;