Skip to content

Commit

Permalink
COLDBOX-1295 #resolve
Browse files Browse the repository at this point in the history
Dumps in BugReport.cfm need top attributes
  • Loading branch information
lmajano committed Sep 23, 2024
1 parent 58d7f97 commit 652b80b
Showing 1 changed file with 47 additions and 29 deletions.
76 changes: 47 additions & 29 deletions system/exceptions/BugReport.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ www.ortussolutions.com
A reporting template about exceptions in your ColdBox Apps
----------------------------------------------------------------------->
<cfscript>
// Max Top
local.maxTop = 10;
// Detect Session Scope
local.sessionScopeExists = true;
try { structKeyExists( session ,'x' ); }
Expand Down Expand Up @@ -247,37 +249,49 @@ A reporting template about exceptions in your ColdBox Apps
</tr>
</cfif>
</cfif>
<tr >

<tr>
<th colspan="2" >Form variables:</th>
</tr>
<cfloop collection="#form#" item="key">
<cfif key neq "fieldnames">
<tr>
<td align="right" class="info">#encodeForHTML( key )#:</td>
<cfif isSimpleValue( form[ key ] )>
<td>#encodeForHTML( form[ key ] )#</td>
<cfelse>
<td><cfdump var="#form[ key ]#"></td>
</cfif>
</tr>
</cfif>
</cfloop>
<tr >
</tr>

<cfloop collection="#form#" item="key">
<cfif key neq "fieldnames">
<tr>
<td align="right" class="info">#encodeForHTML( key )#:</td>
<cfif isSimpleValue( form[ key ] )>
<td>#encodeForHTML( form[ key ] )#</td>
<cfelse>
<td>
<cfdump var="#form[ key ]#" top="#local.maxTop#">
</td>
</cfif>
</tr>
</cfif>
</cfloop>

<tr>
<th colspan="2" >Session Storage:</th>
</tr>
<cfif local.sessionScopeExists>
<cfloop collection="#session#" item="key">
<tr>
<td align="right" class="info"> #encodeForHTML( key )#: </td>
<td><cfif isSimpleValue( session[ key ] )>#encodeForHTML( session[ key ] )#<cfelse>#encodeForHTML( key )# <cfdump var="#session[ key ]#"></cfif></td>
</tr>
</cfloop>
<cfelse>
<tr>
<td align="right" class="info"> N/A </td>
<td >Session Scope Not Enabled</td>
</tr>
</cfif>

<cfif local.sessionScopeExists>
<cfloop collection="#session#" item="key">
<tr>
<td align="right" class="info">#encodeForHTML( key )#:</td>
<td>
<cfif isSimpleValue( session[ key ] )>
#encodeForHTML( session[ key ] )#
<cfelse>
#encodeForHTML( key )# <cfdump var="#session[ key ]#" top="#local.maxTop#">
</cfif>
</td>
</tr>
</cfloop>
<cfelse>
<tr>
<td align="right" class="info"> N/A </td>
<td >Session Scope Not Enabled</td>
</tr>
</cfif>
<tr >
<th colspan="2" >Cookies:</th>
</tr>
Expand All @@ -297,7 +311,11 @@ A reporting template about exceptions in your ColdBox Apps
<cfif isSimpleValue( oException.getExtraInfo() )>
<cfif not len(oException.getExtraInfo())>[N/A]<cfelse>#encodeForHTML( oException.getExtraInfo() )#</cfif>
<cfelse>
<cfdump var="#oException.getExtraInfo()#" expand="false">
<cfdump
var="#oException.getExtraInfo()#"
expand="false"
label="Extra Info"
>
</cfif>
</td>
</tr>
Expand Down

0 comments on commit 652b80b

Please sign in to comment.