-
Notifications
You must be signed in to change notification settings - Fork 79
/
Exception.php
46 lines (41 loc) · 937 Bytes
/
Exception.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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;
}
}