for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Scriptotek\Alma\Exception;
class RequestFailed extends ClientException
{
/**
* @var string
*/
private $errorCode;
public function __construct(string $message, string $errorCode = null, \Exception $previous = null)
// Since the error code is generally a string, we store it in a local property
// rather than passing it on to the parent constructor, which expects an integer.
$this->errorCode = $errorCode;
parent::__construct($message, 0, $previous);
}
* Returns the error code string.
public function getErrorCode()
return $this->errorCode;