FIX: catch exceptions on homepage
This commit is contained in:
@@ -12,16 +12,15 @@ class Homepage extends ContentPage
|
||||
$page = $this->content->getHomepage();
|
||||
|
||||
// test if we have any homepage
|
||||
/*if (!$page) {
|
||||
return view('errors.homepageNotAvailable');
|
||||
}*/
|
||||
if (!$page) {
|
||||
return view('errors.homepageNotAvailable', ['reason' => 'nothing set']);
|
||||
}
|
||||
|
||||
// render page
|
||||
/* try {
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return view('errors.homepageNotAvailable');
|
||||
}*/
|
||||
try {
|
||||
return $this->renderPage($page);
|
||||
} catch (\Exception $e) {
|
||||
return view('errors.homepageNotAvailable', ['exception' => $e, 'reason' => 'exception']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user