Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
00bf127c
Commit
00bf127c
authored
Apr 25, 2016
by
Carsten Rose
Browse files
AbstractException.php: report column index/name/value of failed report
parent
d28b523a
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/exceptions/AbstractException.php
View file @
00bf127c
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment