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

Exceptions: debugShowStack implemented

parent 71fe7f50
......@@ -24,7 +24,7 @@ class AbstractException extends \Exception {
* @param \Exception $previous
*/
public function __construct($message = '', $code = 0, \Exception $previous = null) {
$this->store = \qfq\Store::getInstance('');
// $this->store = \qfq\Store::getInstance('');
parent::__construct($message, $code, $previous);
}
......@@ -38,7 +38,8 @@ class AbstractException extends \Exception {
$this->messageArray['Message'] = $this->getMessage();
$this->messageArray['Code'] = $this->getCode();
if ($this->store->getVar('debugShowStack', STORE_TYPO3) === '1') {
if (Store::getVar('debugShowStack', STORE_TYPO3) === '1') {
$this->messageArray['Stacktrace'] = '<pre>' . $this->getTraceAsString() . '</pre>';
}
......
......@@ -26,12 +26,12 @@ class DbException extends AbstractException {
public function formatMessage() {
$this->messageArray['Type'] = 'Db Exception';
$this->messageArray['Form'] = $this->store->getVar(SYSTEM_FORM, STORE_SYSTEM);
$this->messageArray['Form Element'] = $this->store->getVar(SYSTEM_FORM_ELEMENT, STORE_SYSTEM);
$this->messageArray['Form Element Column'] = $this->store->getVar(SYSTEM_FORM_ELEMENT_COLUMN, STORE_SYSTEM);
$this->messageArray['SQL before evaluation'] = $this->store->getVar(SYSTEM_SQL_RAW, STORE_SYSTEM);
$this->messageArray['SQL after evaluation'] = $this->store->getVar(SYSTEM_SQL_FINAL, STORE_SYSTEM);
$this->messageArray['SQL Params'] = $this->store->getVar(SYSTEM_SQL_PARAM_ARRAY, STORE_SYSTEM);
$this->messageArray['Form'] = Store::getVar(SYSTEM_FORM, STORE_SYSTEM);
$this->messageArray['Form Element'] = Store::getVar(SYSTEM_FORM_ELEMENT, STORE_SYSTEM);
$this->messageArray['Form Element Column'] = Store::getVar(SYSTEM_FORM_ELEMENT_COLUMN, STORE_SYSTEM);
$this->messageArray['SQL before evaluation'] = Store::getVar(SYSTEM_SQL_RAW, STORE_SYSTEM);
$this->messageArray['SQL after evaluation'] = Store::getVar(SYSTEM_SQL_FINAL, STORE_SYSTEM);
$this->messageArray['SQL Params'] = Store::getVar(SYSTEM_SQL_PARAM_ARRAY, STORE_SYSTEM);
return parent::formatException();
......
......@@ -26,9 +26,9 @@ class UserException extends AbstractException {
public function formatMessage() {
$this->messageArray['Type'] = 'User Exception';
$this->messageArray['Form'] = $this->store->getVar(SYSTEM_FORM, STORE_SYSTEM);
$this->messageArray['Form Element'] = $this->store->getVar(SYSTEM_FORM_ELEMENT, STORE_SYSTEM);
$this->messageArray['Form Element Column'] = $this->store->getVar(SYSTEM_FORM_ELEMENT_COLUMN, STORE_SYSTEM);
$this->messageArray['Form'] = Store::getVar(SYSTEM_FORM, STORE_SYSTEM);
$this->messageArray['Form Element'] = Store::getVar(SYSTEM_FORM_ELEMENT, STORE_SYSTEM);
$this->messageArray['Form Element Column'] = Store::getVar(SYSTEM_FORM_ELEMENT_COLUMN, STORE_SYSTEM);
return parent::formatException();
}
......
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