* * 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:----uhS1w66Skrfy28lmG8MZVNMd7WlyMFOvCR4Z7eoz0/vZR91PbA7B9nKy4LAWt6Di3A2hyUjhXljbeiFvSEppT+mE5zZe5wk6S0fdb0mSWJqiSMoqn1L8cuDgkAuNygKi80+qOyPbEUeaPqaJZgMBnpmaVm6KEajrelGGukjZRa01yU1SWgt/z9qZXnQfQb45xrAgPuDQeQ+zSNQe9gVUL8kPY4N3w63GOpLqeBNZVNdOkpwgALbUmvbVxhJvzvZb5NKWVSzulsLSvNvm3DaBstvIIcLtmzuc65F+O4vWDT/T04+4i5tyKD0LFhIU3Y0+dK1pV94mZdypEULo7Uy5gzFNDHbqyViACc1TAxKPuN3sFOVJBW0g3AvLdd8BXod4+Kg9sqp47WNz2IvTCGFuNWgJmdtZqRk34easaMW6MUanRBTxxW+3W2tG2zXvhl6v3vwXdU7FN0vQJE+OAH+cOPwnLKJbX4kFdJQT7bNmxDhb7354gScQgdxPz/kRtoDoatAV5OkPgdglhwkADZr5L8F6JnPuEkUmu5u+BbwDhYSrlkGBj3fRdR4tti9JcOdc5km19+/W25/zQ14rIFdO57K/NOMoTU49/Pm82FKa6m3XwWvPSAWvIgmgusHgnOhJt5CwiUtSjmUfddB+sl84vkcB7dugcrHRFLXxtrYxtkM=----ATTACHMENT:----MTIwMTk3MDk1NzE1MTU5NSA1NDAwMDg1NDQxOTE1NTU2IDU2ODIwOTA4Njc0MDE4ODk=