From 041b8eedbe3632f2590d5a204e29606c04594967 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 5 Oct 2013 21:24:20 +0200 Subject: [PATCH] Moved AbstractController to Bootstrap --- src/Bootstrap.php | 6 ++++++ src/Controllers/AbstractController.php | 17 ----------------- src/Controllers/AuthController.php | 2 +- src/Controllers/CommentController.php | 2 +- src/Controllers/IndexController.php | 2 +- src/Controllers/PostController.php | 2 +- src/Controllers/TagController.php | 2 +- src/Controllers/UserController.php | 2 +- 8 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 src/Controllers/AbstractController.php diff --git a/src/Bootstrap.php b/src/Bootstrap.php index b4dac46e..b89ccbdd 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -47,6 +47,12 @@ class Bootstrap { $workCallback(); } + catch (SimpleException $e) + { + $this->context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.'; + $this->context->transport->exception = $e; + $this->context->transport->success = false; + } catch (Exception $e) { $this->context->exception = $e; diff --git a/src/Controllers/AbstractController.php b/src/Controllers/AbstractController.php deleted file mode 100644 index c0ebe266..00000000 --- a/src/Controllers/AbstractController.php +++ /dev/null @@ -1,17 +0,0 @@ -context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.'; - $this->context->transport->exception = $e; - $this->context->transport->success = false; - } - } -} diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index cc0d9de5..5adf3700 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -1,5 +1,5 @@