Skip to content

Commit

Permalink
Merge pull request #1 from croxarens/master
Browse files Browse the repository at this point in the history
Passing the $error and $description parameters to the \Exception $cod…
  • Loading branch information
leongersen authored Mar 24, 2022
2 parents 13ca836 + 025e159 commit e537b5b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Auth/OAuthTokenRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,39 @@

use Exception;

/**
* Represents an OAuth token request exception.
/**
* Represents an OAuth token request exception.
*/
class OAuthTokenRequestException extends Exception
{
{
public $Error;
public $Description;

public function __construct() {}

/**
/**
* Includes the error.
*
*
* @param string $error
*
* @return OAuthTokenRequestException
*/
public function withError($error) {
$this->Error = $error;
$this->code = $error;
return $this;
}

/**
/**
* Includes the error description.
*
*
* @param string $description
*
* @return OAuthTokenRequestException
*/
public function withDescription($description) {
$this->Description = $description;
$this->message = $description;
return $this;
}
}

0 comments on commit e537b5b

Please sign in to comment.