Commit 00bf127c authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbstractException.php: report column index/name/value of failed report

parent d28b523a
......@@ -10,6 +10,7 @@ namespace qfq;
require_once(__DIR__ . '/../../qfq/store/Store.php');
require_once(__DIR__ . '/UserFormException.php');
require_once(__DIR__ . '/../Constants.php');
class AbstractException extends \Exception {
......@@ -21,6 +22,7 @@ class AbstractException extends \Exception {
protected $line = '';
/**
* @return string
*/
......@@ -39,6 +41,7 @@ class AbstractException extends \Exception {
$this->messageArray['Line'] = $this->getLine();
$this->messageArray['Message'] = $this->getMessage();
$this->messageArray['Code'] = $this->getCode();
$this->messageArray['Stacktrace'] = '<pre>' . $this->getTraceAsString() . '</pre>';
if ($store !== null) {
$this->messageArray['Page Id'] = $store->getVar(TYPO3_PAGE_ID, STORE_TYPO3);
......@@ -48,6 +51,7 @@ class AbstractException extends \Exception {
$html .= "Code: " . $this->messageArray['Code'] . "<br>";
$html .= "Message: " . Support::wrapTag("<strong>", $this->messageArray['Message']) . "</br>";
// Form
if (isset($this->messageArray['Form'])) {
$html .= "Form: " . Support::wrapTag("<strong>", $this->messageArray['Form']) . "</br>";
}
......@@ -56,6 +60,19 @@ class AbstractException extends \Exception {
$html .= "Form Element: " . Support::wrapTag("<strong>", $this->messageArray['Form Element']) . "</br>";
}
// Report
if (isset($this->messageArray[SYSTEM_REPORT_COLUMN_INDEX])) {
$html .= "Column index: " . Support::wrapTag("<strong>", $this->messageArray[SYSTEM_REPORT_COLUMN_INDEX]) . "</br>";
}
if (isset($this->messageArray[SYSTEM_REPORT_COLUMN_NAME])) {
$html .= "Column name: " . Support::wrapTag("<strong>", $this->messageArray[SYSTEM_REPORT_COLUMN_NAME]) . "</br>";
}
if (isset($this->messageArray[SYSTEM_REPORT_COLUMN_VALUE])) {
$html .= "Column value: " . Support::wrapTag("<strong>", $this->messageArray[SYSTEM_REPORT_COLUMN_VALUE]) . "</br>";
}
$html = "<h2>Error</h2>" . Support::wrapTag('<p>', $html);
$html = Support::wrapTag("<div class='warning'>", $html);
......
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