Commit c889d94d authored by Carsten  Rose's avatar Carsten Rose
Browse files

DbException: Errormessage enhanced with more information.

parent 607a5bd8
......@@ -9,6 +9,9 @@
namespace qfq\exceptions;
require_once(__DIR__ . '/../../qfq/store/Store.php');
require_once(__DIR__ . '/../../qfq/Constants.php');
/**
* Class UserException
*
......@@ -16,16 +19,19 @@ namespace qfq\exceptions;
*
* @package qfq\exceptions
*/
class DbException extends \Exception {
/*
* @return string HTML formatted error string
*/
public function formatMessage() {
$message = '<div style="border: 1px black solid">';
$message .= $this->getMessage();
$message .= '</div>';
$store = \qfq\store\Store::getInstance('');
$message = '<div style="border: 1px red solid">' .
$this->getMessage() .
'<p>' . $store->getVar(SYSTEM_SQL_FINAL, STORE_SYSTEM) . '</p>' .
'<p>' . str_replace("\n", "<br>", print_r($store->getVar(SYSTEM_SQL_PARAM_ARRAY, STORE_SYSTEM), true)) . '</p>' .
'</div>';
return ($message);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment