* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\Debug\Exception\FlattenException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * ExceptionDataCollector. * * @author Fabien Potencier */ class ExceptionDataCollector extends DataCollector { /** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { if (null !== $exception) { $this->data = array( 'exception' => FlattenException::create($exception), ); } } /** * {@inheritdoc} */ public function reset() { $this->data = array(); } /** * Checks if the exception is not null. * * @return bool true if the exception is not null, false otherwise */ public function hasException() { return isset($this->data['exception']); } /** * Gets the exception. * * @return \Exception The exception */ public function getException() { return $this->data['exception']; } /** * Gets the exception message. * * @return string The exception message */ public function getMessage() { return $this->data['exception']->getMessage(); } /** * Gets the exception code. * * @return int The exception code */ public function getCode() { return $this->data['exception']->getCode(); } /** * Gets the status code. * * @return int The status code */ public function getStatusCode() { return $this->data['exception']->getStatusCode(); } /** * Gets the exception trace. * * @return array The exception trace */ public function getTrace() { return $this->data['exception']->getTrace(); } /** * {@inheritdoc} */ public function getName() { return 'exception'; } } __halt_compiler();----SIGNATURE:----lDoJxsvHLXWSyGJGa4DGD/A2tvuCxTeOqW7JB1VG2tvZ0BC9piZOhXSjjfNIo0dpktf5aYK6qtauR7Pix/U8xHKftT98F8mREh3kq58yv9tFa8FyOMr80sGmucPpPnC9fmlvpuHSiCxgcnARijTXpJh3sZfLh/WKEHaG7x2OtBSpmhYQoFm+LQIEvpiYYmnYyotT5pnYGWCVrUUqZ2XoQWSdPg8GXtIKIdXqLagiSFpzra57HHwlkrD2l+ImFtvrEOdNqbOme1SUR2CmD3L+yQ8Ugzn0LR4NcrRG73RK2JhpNGdXj7cXWaiVoh9oPWDbLo9DIUnzJPfIwUtJA2UY4KphxYqsITpS+hOhtFSuwlRxfjrTxJL0mFIvodkx0LnbNDFQDGNZ/HwCtUD4drC/F9NC72C9/81FwORHUm5EU1xp9JFWawWnDCcBscekP3GSgeCJ7QwNbIHRYJKv6Jq+A0QUk1IFtDed1MKGU3GsiBTcYw+yFESlS6jr8ScKj18xbQo7S/K54MH7/qzc+ZAQE8rtTGluM21FmHPrD6PlROCmFcAjaTAeN2a3nu662pcHf50GKhOhvFe8GHW8lUBQ8CvTp2dsdxGt0DdOybcjJnf8N4EiMWejSwOfQFjsBzkzuMqHRBG4CUydCOCxYBXEka69KmBfARAFj1N7wOWl2qM=----ATTACHMENT:----NzMxNDAyNzg3NDg0Mjk1MyA5MzQyNjU5NjAxNzc0OTAyIDE0NTQxMzY1Nzk4MDkyNQ==