12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace Symfony\Component\VarDumper\Exception;
- class ThrowingCasterException extends \Exception
- {
-
- public function __construct($prev, \Exception $e = null)
- {
- if (!$prev instanceof \Exception) {
- @trigger_error('Providing $caster as the first argument of the '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Provide directly the $prev exception instead.', E_USER_DEPRECATED);
- $prev = $e;
- }
- parent::__construct('Unexpected '.get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev);
- }
- }
|