Completed
Push — master ( f04f52...152406 )
by Anton
03:17
created

ProxyFactoryException::wrap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license MIT
6
 * @author  Valentin V (Vvval)
7
 */
8
declare(strict_types=1);
9
10
namespace Cycle\ORM\Promise\Exception;
11
12
class ProxyFactoryException extends \Exception
13
{
14
    /**
15
     * @param \Throwable $e
16
     * @return ProxyFactoryException
17
     */
18
    public static function wrap(\Throwable $e): self
19
    {
20
        return new self($e->getMessage(), $e->getCode(), $e);
21
    }
22
}