mirror of
https://github.com/cosmocode/dokuwiki-plugin-oauth.git
synced 2025-07-26 15:53:30 +00:00
47 lines
937 B
PHP
47 lines
937 B
PHP
<?php
|
|
|
|
namespace dokuwiki\plugin\oauth;
|
|
|
|
/**
|
|
* Our own OAuth Plugin Exceptions
|
|
*
|
|
* @todo maybe add debug logging here later
|
|
* @todo add translations here
|
|
*/
|
|
class Exception extends \OAuth\Common\Exception\Exception
|
|
{
|
|
protected $context = [];
|
|
|
|
/**
|
|
* @param string $message
|
|
* @param array $context
|
|
* @param int $code
|
|
* @param \Throwable|null $previous
|
|
*/
|
|
public function __construct($message = "", $context = [], $code = 0, \Throwable $previous = null)
|
|
{
|
|
parent::__construct($message, $code, $previous);
|
|
$this->context = $context;
|
|
}
|
|
|
|
/**
|
|
* Get the translation context
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getContext()
|
|
{
|
|
return $this->context;
|
|
}
|
|
|
|
/**
|
|
* Set the translation context
|
|
*
|
|
* @param array $context
|
|
*/
|
|
public function setContext(array $context)
|
|
{
|
|
$this->context = $context;
|
|
}
|
|
}
|