Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Debug\Exception; Chris@0: Chris@0: /** Chris@0: * Error Exception with Variable Context. Chris@0: * Chris@0: * @author Christian Sciberras Chris@12: * Chris@12: * @deprecated since version 3.3. Instead, \ErrorException will be used directly in 4.0. Chris@0: */ Chris@0: class ContextErrorException extends \ErrorException Chris@0: { Chris@17: private $context = []; Chris@0: Chris@17: public function __construct($message, $code, $severity, $filename, $lineno, $context = []) Chris@0: { Chris@0: parent::__construct($message, $code, $severity, $filename, $lineno); Chris@0: $this->context = $context; Chris@0: } Chris@0: Chris@0: /** Chris@0: * @return array Array of variables that existed when the exception occurred Chris@0: */ Chris@0: public function getContext() Chris@0: { Chris@12: @trigger_error(sprintf('The %s class is deprecated since Symfony 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); Chris@12: Chris@0: return $this->context; Chris@0: } Chris@0: }