Skip to content
Snippets Groups Projects
Commit 00bf127c authored by Carsten  Rose's avatar Carsten Rose
Browse files

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

parent d28b523a
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ namespace qfq; ...@@ -10,6 +10,7 @@ namespace qfq;
require_once(__DIR__ . '/../../qfq/store/Store.php'); require_once(__DIR__ . '/../../qfq/store/Store.php');
require_once(__DIR__ . '/UserFormException.php'); require_once(__DIR__ . '/UserFormException.php');
require_once(__DIR__ . '/../Constants.php');
class AbstractException extends \Exception { class AbstractException extends \Exception {
...@@ -21,6 +22,7 @@ class AbstractException extends \Exception { ...@@ -21,6 +22,7 @@ class AbstractException extends \Exception {
protected $line = ''; protected $line = '';
/** /**
* @return string * @return string
*/ */
...@@ -39,6 +41,7 @@ class AbstractException extends \Exception { ...@@ -39,6 +41,7 @@ class AbstractException extends \Exception {
$this->messageArray['Line'] = $this->getLine(); $this->messageArray['Line'] = $this->getLine();
$this->messageArray['Message'] = $this->getMessage(); $this->messageArray['Message'] = $this->getMessage();
$this->messageArray['Code'] = $this->getCode(); $this->messageArray['Code'] = $this->getCode();
$this->messageArray['Stacktrace'] = '<pre>' . $this->getTraceAsString() . '</pre>'; $this->messageArray['Stacktrace'] = '<pre>' . $this->getTraceAsString() . '</pre>';
if ($store !== null) { if ($store !== null) {
$this->messageArray['Page Id'] = $store->getVar(TYPO3_PAGE_ID, STORE_TYPO3); $this->messageArray['Page Id'] = $store->getVar(TYPO3_PAGE_ID, STORE_TYPO3);
...@@ -48,6 +51,7 @@ class AbstractException extends \Exception { ...@@ -48,6 +51,7 @@ class AbstractException extends \Exception {
$html .= "Code: " . $this->messageArray['Code'] . "<br>"; $html .= "Code: " . $this->messageArray['Code'] . "<br>";
$html .= "Message: " . Support::wrapTag("<strong>", $this->messageArray['Message']) . "</br>"; $html .= "Message: " . Support::wrapTag("<strong>", $this->messageArray['Message']) . "</br>";
// Form
if (isset($this->messageArray['Form'])) { if (isset($this->messageArray['Form'])) {
$html .= "Form: " . Support::wrapTag("<strong>", $this->messageArray['Form']) . "</br>"; $html .= "Form: " . Support::wrapTag("<strong>", $this->messageArray['Form']) . "</br>";
} }
...@@ -56,6 +60,19 @@ class AbstractException extends \Exception { ...@@ -56,6 +60,19 @@ class AbstractException extends \Exception {
$html .= "Form Element: " . Support::wrapTag("<strong>", $this->messageArray['Form Element']) . "</br>"; $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 = "<h2>Error</h2>" . Support::wrapTag('<p>', $html);
$html = Support::wrapTag("<div class='warning'>", $html); $html = Support::wrapTag("<div class='warning'>", $html);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment