diff --git a/site/config/bootstrap.php b/site/config/bootstrap.php
index 2c89c74..005be55 100644
--- a/site/config/bootstrap.php
+++ b/site/config/bootstrap.php
@@ -31,6 +31,39 @@
* You can also use this to include or require any files in your application.
*
*/
+
+function INTERNAL_ERROR($message) {
+ echo '
';
+ echo '
INTERNAL ERROR:
';
+ echo '
' . $message . '
';
+ echo '
This error was not caused by anything that you did wrong.';
+ echo '
It is a problem within the application itself and should be reported to the administrator.
';
+
+ // Print out the entire stack trace
+ echo "
Stack Trace:
";
+ $trace = debug_backtrace(false);
+ for ($i = 0; $i < count($trace); ++$i) {
+ $bline = $trace[$i]['line'];
+ $bfile = $trace[$i]['file'];
+ $bfile = str_replace(ROOT.DS, '', $bfile);
+ $bfile = str_replace(CAKE_CORE_INCLUDE_PATH.DS, '', $bfile);
+
+ if ($i < count($trace)-1) {
+ $bfunc = $trace[$i+1]['function'];
+ $bclas = $trace[$i+1]['class'];
+ } else {
+ $bfunc = null;
+ $bclas = null;
+ }
+
+ echo("- $bfile:$bline (" . ($bclas ? "$bclas::$bfunc" : "entry point") . ")
\n");
+ }
+ echo '
';
+
+ echo '
';
+ die();
+}
+
/**
* The settings below can be used to set additional paths to models, views and controllers.
* This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)