Update v1.0.6
This commit is contained in:
40
vendor/tymon/jwt-auth/src/Exceptions/JWTException.php
vendored
Normal file
40
vendor/tymon/jwt-auth/src/Exceptions/JWTException.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Tymon\JWTAuth\Exceptions;
|
||||
|
||||
class JWTException extends \Exception
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
protected $statusCode = 500;
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param integer $statusCode
|
||||
*/
|
||||
public function __construct($message = 'An error occurred', $statusCode = null)
|
||||
{
|
||||
parent::__construct($message);
|
||||
|
||||
if (! is_null($statusCode)) {
|
||||
$this->setStatusCode($statusCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $statusCode
|
||||
*/
|
||||
public function setStatusCode($statusCode)
|
||||
{
|
||||
$this->statusCode = $statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return integer the status code
|
||||
*/
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->statusCode;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user