errorHandler->exception; if ($exception !== null) { if($exception->getCode()==404) { return $this->renderPartial('lost'); } else { $code = $exception->getCode()?$exception->getCode():'500'; $data = [ 'code' => $code, 'message' => $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exception->getLine(), 'lastnum'=>substr($code,2,1), 'homeurl'=>APP_URL ]; if(defined('IN_ADMIN')&&IN_ADMIN==true) { $data['homeurl'] = $this->adminHomeUrl; } return $this->renderPartial('error', $data); } } } }