JsonException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Core;
4
5
use Throwable;
6
7
/**
8
 * Custom error handeler for ajax / json errors.
9
 * this is intercepted in the Error class
10
 * When this is called, we return a json error with a code of 400 if in prod mode or we return the error in json format if in dev mode
11
 * Class JsonException
12
 * @package Core
13
 */
14
class JsonException extends \Exception
15
{
16
17
    public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
18
    {
19
        parent::__construct($message, $code, $previous);
20
    }
21
22
}