Added back some toArray() implementations.

This commit is contained in:
Qiang Xue
2014-03-07 22:05:45 -05:00
parent b3b515b9d1
commit ad19e332f4
3 changed files with 23 additions and 0 deletions

View File

@ -145,6 +145,9 @@ class ErrorHandler extends Component
'message' => $exception->getMessage(),
'code' => $exception->getCode(),
];
if ($exception instanceof HttpException) {
$array['status'] = $exception->statusCode;
}
if (($prev = $exception->getPrevious()) !== null) {
$array['previous'] = $this->convertExceptionToArray($prev);
}