aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace')
-rw-r--r--core/namespace/Application.php6
-rw-r--r--core/namespace/ExceptionHandler.php8
-rw-r--r--core/namespace/Page/Exception.php2
-rw-r--r--core/namespace/Post/Exception.php2
-rw-r--r--core/namespace/Template/Exception.php2
-rw-r--r--core/namespace/User/Exception.php2
6 files changed, 7 insertions, 15 deletions
diff --git a/core/namespace/Application.php b/core/namespace/Application.php
index 17cd020..36dd2cd 100644
--- a/core/namespace/Application.php
+++ b/core/namespace/Application.php
@@ -137,11 +137,11 @@ class Application {
}
#===============================================================================
- # Exit application with a custom HTTP status code
+ # Exit application with a custom message and status code
#===============================================================================
- public static function exit($code = 500) {
+ public static function exit($message = '', $code = 503) {
http_response_code($code);
- exit();
+ exit($message);
}
#===============================================================================
diff --git a/core/namespace/ExceptionHandler.php b/core/namespace/ExceptionHandler.php
deleted file mode 100644
index d64d74c..0000000
--- a/core/namespace/ExceptionHandler.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-abstract class ExceptionHandler extends Exception {
- public function defaultHandler($code = 503) {
- http_response_code(503);
- exit(parent::getMessage());
- }
-}
-?> \ No newline at end of file
diff --git a/core/namespace/Page/Exception.php b/core/namespace/Page/Exception.php
index d3aa06a..d4794b7 100644
--- a/core/namespace/Page/Exception.php
+++ b/core/namespace/Page/Exception.php
@@ -1,5 +1,5 @@
<?php
namespace Page;
-class Exception extends \ExceptionHandler {}
+class Exception extends \Exception {}
?> \ No newline at end of file
diff --git a/core/namespace/Post/Exception.php b/core/namespace/Post/Exception.php
index f752bf8..516ddbe 100644
--- a/core/namespace/Post/Exception.php
+++ b/core/namespace/Post/Exception.php
@@ -1,5 +1,5 @@
<?php
namespace Post;
-class Exception extends \ExceptionHandler {}
+class Exception extends \Exception {}
?> \ No newline at end of file
diff --git a/core/namespace/Template/Exception.php b/core/namespace/Template/Exception.php
index 52c522e..a38ee1d 100644
--- a/core/namespace/Template/Exception.php
+++ b/core/namespace/Template/Exception.php
@@ -1,5 +1,5 @@
<?php
namespace Template;
-class Exception extends \ExceptionHandler {}
+class Exception extends \Exception {}
?> \ No newline at end of file
diff --git a/core/namespace/User/Exception.php b/core/namespace/User/Exception.php
index be0a599..b5bcad0 100644
--- a/core/namespace/User/Exception.php
+++ b/core/namespace/User/Exception.php
@@ -1,5 +1,5 @@
<?php
namespace User;
-class Exception extends \ExceptionHandler {}
+class Exception extends \Exception {}
?> \ No newline at end of file