mirror of
https://github.com/pierre42100/comunic
synced 2025-06-19 16:45:18 +00:00
First commit
This commit is contained in:
31
developer/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php
vendored
Normal file
31
developer/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Exception;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
class ThrowingCasterException extends \Exception
|
||||
{
|
||||
/**
|
||||
* @param \Exception $prev The exception thrown from the caster
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user