1 | <?php |
||
11 | class OrmException extends \Generics\GenericsException |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Create a new OrmException instance |
||
16 | * |
||
17 | * @param string $message |
||
18 | * The message to throw |
||
19 | * @param array $context |
||
20 | * Optional context key-value-pairs |
||
21 | * @param int $number |
||
22 | * Optional exception code |
||
23 | * @param \Exception $previous |
||
24 | * Optional previous occured exception to embed |
||
25 | */ |
||
26 | 7 | public function __construct(string $message, array $context = array(), int $number = 0, \Exception $previous = null) |
|
30 | |||
31 | /** |
||
32 | * Throw derived ORMException setting the previous as internal |
||
33 | * |
||
34 | * @param \Exception $exception |
||
35 | * The original exception |
||
36 | * @param string $message |
||
37 | * Optional message to embed |
||
38 | * @param int $code |
||
39 | * Optional exception code to embed |
||
40 | * |
||
41 | * @throws OrmException |
||
42 | */ |
||
43 | 3 | public static function fromPrevious(\Exception $exception, string $message = null, int $code = 0) |
|
50 | } |
||
51 |