diff --git a/Bin/Bedrock.php b/Bin/Bedrock.php index 36025fe..e07c7ed 100644 --- a/Bin/Bedrock.php +++ b/Bin/Bedrock.php @@ -46,8 +46,8 @@ class Bedrock { Debug::group( 'Bedrock Application' ); ob_start(); self::$activeConfig = new Config( CONFIG_JSON ); - set_error_handler( [ 'TheTempusProject\\Canary\\Canary', 'handle_error' ] ); - set_exception_handler( [ 'TheTempusProject\\Canary\\Canary', 'handle_exception' ] ); + set_error_handler( [ BEDROCK_DEFAULT_ERROR_HANDLER, 'handle_error' ] ); + set_exception_handler( [ BEDROCK_DEFAULT_EXCEPTION_HANDLER, 'handle_exception' ] ); self::$controllerName = DEFAULT_CONTROLLER_CLASS; self::$methodName = DEFAULT_CONTROLLER_METHOD; $this->setUrl( $url ); diff --git a/Config/constants.php b/Config/constants.php index 3d1be4f..b3f1ac9 100644 --- a/Config/constants.php +++ b/Config/constants.php @@ -47,24 +47,30 @@ } // Debug // Log Levels - if ( ! defined('CANARY_DEBUG_LEVEL_ERROR' ) ) { - define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' ); - } - if ( ! defined('CANARY_DEBUG_LEVEL_WARN' ) ) { - define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' ); - } - if ( ! defined('CANARY_DEBUG_LEVEL_INFO' ) ) { - define( 'CANARY_DEBUG_LEVEL_INFO', 'info' ); - } - if ( ! defined('CANARY_DEBUG_LEVEL_LOG' ) ) { - define( 'CANARY_DEBUG_LEVEL_LOG', 'log' ); - } - if ( ! defined('CANARY_DEBUG_LEVEL_DEBUG' ) ) { - define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' ); - } + if ( ! defined('CANARY_DEBUG_LEVEL_ERROR' ) ) { + define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' ); + } + if ( ! defined('CANARY_DEBUG_LEVEL_WARN' ) ) { + define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' ); + } + if ( ! defined('CANARY_DEBUG_LEVEL_INFO' ) ) { + define( 'CANARY_DEBUG_LEVEL_INFO', 'info' ); + } + if ( ! defined('CANARY_DEBUG_LEVEL_LOG' ) ) { + define( 'CANARY_DEBUG_LEVEL_LOG', 'log' ); + } + if ( ! defined('CANARY_DEBUG_LEVEL_DEBUG' ) ) { + define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' ); + } if (!defined('CANARY_ENABLED')) { define('CANARY_ENABLED', false); } + if (!defined('BEDROCK_DEFAULT_ERROR_HANDLER')) { + define('BEDROCK_DEFAULT_ERROR_HANDLER', 'TheTempusProject\\Canary\\Bin\\Canary'); + } + if (!defined('BEDROCK_DEFAULT_EXCEPTION_HANDLER')) { + define('BEDROCK_DEFAULT_EXCEPTION_HANDLER', 'TheTempusProject\\Canary\\Bin\\Canary'); + } if (!defined('DEBUG_EMAIL')) { define('DEBUG_EMAIL', 'webmaster@' . $_SERVER['HTTP_HOST']); }