Completed
Push — master ( a2b365...526aac )
by Sébastien
03:19
created

JavaProxiedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\Jasper\Exception;
6
7
use Soluble\Japha\Bridge\Exception\JavaException;
8
9
class JavaProxiedException extends \RuntimeException implements ExceptionInterface
10
{
11
    /**
12
     * @var JavaException
13
     */
14
    protected $javaException;
15
16
    public function __construct(JavaException $javaException)
17
    {
18
        $this->javaException = $javaException;
19
        parent::__construct($javaException->getMessage(), $javaException->getCode());
20
    }
21
22
    /**
23
     * Return java exception as return by the bridge server.
24
     *
25
     * @return JavaException
26
     */
27
    public function getJavaException(): JavaException
28
    {
29
        return $this->javaException;
30
    }
31
}
32