Add support for 401 errors in the templating system
This commit is contained in:
@@ -13,6 +13,7 @@ class SihnonFramework_Exception_TemplateException extends SihnonFramework_E
|
||||
class SihnonFramework_Exception_AbortEntirePage extends SihnonFramework_Exception_TemplateException {};
|
||||
class SihnonFramework_Exception_Unauthorized extends SihnonFramework_Exception_TemplateException {};
|
||||
class SihnonFramework_Exception_FileNotFound extends SihnonFramework_Exception_TemplateException {};
|
||||
class SihnonFramework_Exception_NotAuthorised extends SihnonFramework_Exception_TemplateException {};
|
||||
class SihnonFramework_Exception_InvalidParameters extends SihnonFramework_Exception_TemplateException {};
|
||||
|
||||
class SihnonFramework_Exception_DatabaseException extends SihnonFramework_Exception {};
|
||||
|
||||
@@ -41,7 +41,9 @@ class SihnonFramework_Page {
|
||||
} catch (SihnonFramework_Exception_AbortEntirePage $e) {
|
||||
return false;
|
||||
} catch (SihnonFramework_Exception_FileNotFound $e) {
|
||||
$content = $this->render('errors/404.tpl', 'errors/404.php');
|
||||
$content = $this->render('errors/404.tpl', 'errors/404.php');
|
||||
} catch (SihnonFramework_Exception_NotAuthorised $e) {
|
||||
$content = $this->render('errors/401.tpl', 'errors/404.php');
|
||||
} catch (SihnonFramework_Exception $e) {
|
||||
$content = $this->render('errors/unhandled-exception.tpl', 'errors/unhandled-exception.php', array(
|
||||
'exception' => $e,
|
||||
|
||||
Reference in New Issue
Block a user