summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-04-11 05:37:03 +0200
committerThomas Lange <code@nerdmind.de>2017-04-11 05:37:03 +0200
commitdd0433cf81fe5329b694a148191f09e427d4a56c (patch)
tree0bd9e44cbf17120027b33c4dd1ae6394c89c902a /core
parent7a1b8f471ca133b6ca99cd4e440e6614a7c18537 (diff)
downloadblog-dd0433cf81fe5329b694a148191f09e427d4a56c.tar.gz
blog-dd0433cf81fe5329b694a148191f09e427d4a56c.tar.xz
blog-dd0433cf81fe5329b694a148191f09e427d4a56c.zip
Class "ExceptionHandler" has been removed and several files has been changed.
Diffstat (limited to 'core')
-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