JsonRpcInternalErrorException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 6
cts 6
cp 1
crap 1
rs 10
1
<?php
2
namespace Yoanm\JsonRpcServer\Domain\Exception;
3
4
/**
5
 * JsonRpcInternalErrorException represents unhandled error during JsonRpc method processing (e.g. "Internal server error").
6
 */
7
class JsonRpcInternalErrorException extends JsonRpcException
8
{
9
    const CODE = -32603;
10
11
    /**
12
     * @deprecated no longer in use, will be removed at next major release.
13
     */
14
    const DATA_PREVIOUS_KEY = 'previous';
15
16
    /**
17
     * @param \Throwable|null $previousException
18
     */
19 8
    public function __construct(\Throwable $previousException = null)
20
    {
21 8
        parent::__construct(
22 8
            self::CODE,
23 8
            'Internal error',
24 8
            [],
25 8
            $previousException
26 8
        );
27
    }
28
}
29