1 | <?php |
||
11 | trait OrmExceptionHandler |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Handle a previous occured pdo exception |
||
16 | * |
||
17 | * @param \Nkey\Caribu\Orm\Orm $orm |
||
18 | * The orm instance |
||
19 | * @param \PDOStatement $statement |
||
20 | * The statement which caused the exception to rollback |
||
21 | * @param \Exception $ex |
||
22 | * The exception cause |
||
23 | * @param string $message |
||
24 | * Optional message |
||
25 | * @param int $code |
||
26 | * Optional code |
||
27 | * |
||
28 | * @return OrmException |
||
29 | */ |
||
30 | 2 | private static function handleException(Orm $orm, $statement, \Exception $ex, string $message = null, int $code = 0) |
|
47 | } |
||
48 |