Total Complexity | 6 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ApiErrorException extends Exception |
||
11 | { |
||
12 | /** |
||
13 | * ApiErrorException Constructor. |
||
14 | * |
||
15 | * @param object $object |
||
16 | * @param string $message |
||
17 | * @param int $code |
||
18 | * @param Exception $previous |
||
19 | */ |
||
20 | public function __construct($object, $message = "", $code = 0, Exception $previous = null) |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * __toString() magic method. |
||
29 | */ |
||
30 | public function __toString() |
||
31 | { |
||
32 | return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Sets the error. |
||
37 | * |
||
38 | * @param object $object |
||
39 | */ |
||
40 | public function setError($object) |
||
51 | } |
||
52 | } |
||
54 |