1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-07-24 10:12:02 +02:00

Move exception handler from functions.php to img.php.

This commit is contained in:
Mikael Roos
2017-03-31 00:46:43 +02:00
parent 401478c839
commit 61aa52854e
2 changed files with 16 additions and 16 deletions

View File

@@ -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.
*

View File

@@ -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
* if its defined or create an empty $config.