-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Symfony/Component/Debug/Exception/ContextErrorException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?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\Debug\Exception; | ||
|
||
/** | ||
* Error Exception with Variable Context. | ||
* | ||
* @author Christian Sciberras <uuf6429@gmail.com> | ||
*/ | ||
class ContextErrorException extends \ErrorException | ||
{ | ||
private $context = array(); | ||
|
||
public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) | ||
{ | ||
parent::__construct($message, $code, $severity, $filename, $lineno); | ||
$this->context = $context; | ||
} | ||
|
||
/** | ||
* @return array Array of variables that existed when the exception occured | ||
*/ | ||
public function getContext() | ||
{ | ||
return $this->context; | ||
} | ||
} |