Source for file CaramelException.php
Documentation is available at CaramelException.php
require_once BASEDIR.
'/inc/model/ConfigurationModel.php';
* @author Felix Rupp <kontakt@felixrupp.com>
* @copyright Copyright (c) 2011, Felix Rupp, Nicole Reinhardt
* @license http://www.opensource.org/licenses/mit-license.php MIT-License
* @license http://www.gnu.org/licenses/gpl.html GNU GPL
* @var Array $_codeArray Array which assigns messages to errorcodes
private $_codeArray =
array(
11 =>
"XML-file could not be loaded!",
66 =>
"Bcrypt is not supported on this server!"
* @var String $_adminEmail eMail adress of the admin
private $_adminEmail =
"";
* Constructor for CaramelException
* @param int $caramelCode Errorcode
$this->_adminEmail =
$this->_config->getAdminConfigStringAction("ADMIN_EMAIL");
$this->code =
$caramelCode;
$this->message =
$this->_codeArray[$caramelCode];
} // End of constructor declaration
* Method to print exception details
print
("</head><body><div style=\"margin: 20px auto; width: 80%; padding:12px 16px; border: 2px solid #ec4040; background-color: #fb8b8b; color:white; font-weight: bold; font-family: 'Courier New', Courier, monospace; font-size: 1.2em;\"><p>Error:</p><p>".
$this->message.
"<br>raised in file: ".
$this->file.
" at line: ".
$this->line.
"</p><p>Please contact the administrator of this page via ".
$this->_adminEmail.
".</p></div></body></html>");
} // End of method declaration