mirror of
https://github.com/mosbth/cimage.git
synced 2025-07-25 18:51:19 +02:00
Move exception handler from functions.php to img.php.
This commit is contained in:
@@ -67,22 +67,6 @@ function errorPage($msg, $type = 500)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom exception handler.
|
|
||||||
*/
|
|
||||||
set_exception_handler(function ($exception) {
|
|
||||||
errorPage(
|
|
||||||
"<p><b>img.php: Uncaught exception:</b> <p>"
|
|
||||||
. $exception->getMessage()
|
|
||||||
. "</p><pre>"
|
|
||||||
. $exception->getTraceAsString()
|
|
||||||
. "</pre>",
|
|
||||||
500
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get input from query string or return default value if not set.
|
* Get input from query string or return default value if not set.
|
||||||
*
|
*
|
||||||
|
@@ -8,6 +8,22 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom exception handler.
|
||||||
|
*/
|
||||||
|
set_exception_handler(function ($exception) {
|
||||||
|
errorPage(
|
||||||
|
"<p><b>img.php: Uncaught exception:</b> <p>"
|
||||||
|
. $exception->getMessage()
|
||||||
|
. "</p><pre>"
|
||||||
|
. $exception->getTraceAsString()
|
||||||
|
. "</pre>",
|
||||||
|
500
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get configuration options from file, if the file exists, else use $config
|
* Get configuration options from file, if the file exists, else use $config
|
||||||
* if its defined or create an empty $config.
|
* if its defined or create an empty $config.
|
||||||
|
Reference in New Issue
Block a user