Completed
Push — master ( 765a46...8c9912 )
by Hector
03:05
created

NotAuthorized   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Hborras\TwitterAdsSDK;
4
5
use Exception;
6
7
/**
8
 * @author Hector Borras <[email protected]>
9
 */
10
class TwitterAdsException extends \Exception
11
{
12
    const BAD_REQUEST         = "BAD_REQUEST";
13
    const NOT_AUTHORIZED      = "NOT_AUTHORIZED";
14
    const FORBIDDEN           = "FORBIDDEN";
15
    const NOT_FOUND           = "NOT_FOUND";
16
    const RATE_LIMIT          = "RATE_LIMIT";
17
    const SERVER_ERROR        = "SERVER_ERROR";
18
    const SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE";
19
20
    private $errors;
21
22
    public function __construct($message, $code, Exception $previous = null, $errors)
23
    {
24
        parent::__construct($message, $code, $previous);
25
        $this->errors = $errors;
26
    }
27
28
    /**
29
     * @return mixed
30
     */
31
    public function getErrors()
32
    {
33
        return $this->errors;
34
    }
35
}
36
37
38