public function toArray() {
$exceptions = array();
foreach (array_merge(array(
$this,
), $this
->getAllPrevious()) as $exception) {
$exceptions[] = array(
'message' => $exception
->getMessage(),
'class' => $exception
->getClass(),
'trace' => $exception
->getTrace(),
);
}
return $exceptions;
}