From a073493d9c37944d5cb7aa2628001c2312a0b317 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 19 Dec 2022 22:47:48 -0500 Subject: [PATCH] Bool Exception moved to exceptions dir. --- documents/folders.txt | 2 +- src/bootstrap/common.php | 2 +- .../exceptions/Bool_Exception.php} | 4 ++-- src/main.inc.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/{bootstrap/Exceptions_common_bool.php => classes/exceptions/Bool_Exception.php} (71%) diff --git a/documents/folders.txt b/documents/folders.txt index 08e6a6d..27f1b41 100644 --- a/documents/folders.txt +++ b/documents/folders.txt @@ -3,7 +3,6 @@ tts_framework/src │   ├── auto_loader.php (PSR-4-autoloader) │   ├── common.php (custom string FNs, wipe data, and dump) │   ├── errors.php (Error Handler) -│   ├── Exceptions_common_bool.php (Not a valid bool type Exception) │   ├── filter.php (HTMLPurifier Bootstrap) │   ├── requires.php (secure_includes, file/dir Filters/Validators) │   ├── safer_io.php (Sanitize Input, Validate data and Escape output) @@ -37,6 +36,7 @@ tts_framework/src │   │   ├── app_environment.php (fetch if is_production environment) │   │   └── same_site.php (same_site: Lax, Strict, None) │   ├── exceptions +│   │   ├── Bool_Exception.php (Handles invalid Boolean types) │   │   └── DB_Exception.php (Handles DB Exceptions) │   ├── html_document.php (HTML Class: set/get CSS/JS/Breadcrumbs/Title/Author/Header/Footer) │   ├── html_parser.php (Escape HTML into BB code...to save into db) diff --git a/src/bootstrap/common.php b/src/bootstrap/common.php index 4a588fd..8ffc6f6 100644 --- a/src/bootstrap/common.php +++ b/src/bootstrap/common.php @@ -77,7 +77,7 @@ final class common { return true; default: if ($throw === true) { - throw new \tts\Exceptions_common_bool("Value: ({$bool})"); + throw new \tts\exceptions\Bool_Exception("Value: ({$bool})"); } else { return false; } diff --git a/src/bootstrap/Exceptions_common_bool.php b/src/classes/exceptions/Bool_Exception.php similarity index 71% rename from src/bootstrap/Exceptions_common_bool.php rename to src/classes/exceptions/Bool_Exception.php index 7a874d4..09677ca 100644 --- a/src/bootstrap/Exceptions_common_bool.php +++ b/src/classes/exceptions/Bool_Exception.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace tts; +namespace tts\exceptions; -class Exceptions_common_bool extends \Exception { +class Bool_Exception extends \Exception { public function errorMessage() { $errorMsg = $this->getMessage() . ' is not a valid bool type.'; diff --git a/src/main.inc.php b/src/main.inc.php index c428429..e4ca4cc 100644 --- a/src/main.inc.php +++ b/src/main.inc.php @@ -29,7 +29,7 @@ views::ob_start(); require_once TTS_FRAMEWORK . 'bootstrap/errors.php'; require_once TTS_FRAMEWORK . 'bootstrap/validator.php'; require_once TTS_FRAMEWORK . 'bootstrap/safer_io.php'; -require_once TTS_FRAMEWORK . 'bootstrap/Exceptions_common_bool.php'; +require_once TTS_FRAMEWORK . 'classes/exceptions/Bool_Exception.php'; require_once TTS_FRAMEWORK . 'bootstrap/common.php'; require_once TTS_FRAMEWORK . 'bootstrap/requires.php'; require_once TTS_FRAMEWORK . 'bootstrap/auto_loader.php';