| 1 | <?php |
||
| 7 | class DatabaseException extends RuntimeException |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var Exception[] |
||
| 12 | */ |
||
| 13 | private $ignored = []; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Adds an exception that was most likely ignored to reattempt execution. |
||
| 17 | * |
||
| 18 | * @param Exception $value The exception that was ignored. |
||
| 19 | * @return void |
||
| 20 | */ |
||
| 21 | public function addIgnoredException(Exception $value) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Returns an array of all of the ignored exceptions. |
||
| 28 | * |
||
| 29 | * @return Exception[] A list of all of the ignored Exception objects. |
||
| 30 | */ |
||
| 31 | public function getIgnoredExceptions() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Returns the string reprensentation of this exception. |
||
| 38 | * |
||
| 39 | * The returned string may include... |
||
| 40 | * 1. The class name. |
||
| 41 | * 2. Message. |
||
| 42 | * 3. The previous exception with __toString called on it, if it exists. |
||
| 43 | * 4. All of the ignored exceptions with __toString called on each of them. |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function __toString() |
||
| 60 | } |
||
| 61 |