NIHVIVO-3088 On error in Freemarker servlet processing, display stack trace to authorized users.
This commit is contained in:
parent
100df03127
commit
6bb9831bda
4 changed files with 56 additions and 22 deletions
|
@ -4,10 +4,10 @@
|
|||
|
||||
<h2>${title}</h2>
|
||||
|
||||
<#if aboutText??>
|
||||
<#if aboutText?has_content>
|
||||
<div class="pageGroupBody" id="aboutText">${aboutText}</div>
|
||||
</#if>
|
||||
|
||||
<#if acknowledgeText??>
|
||||
<#if acknowledgeText?has_content>
|
||||
<div class="pageGroupBody" id="acknowledgementText">${acknowledgeText}</div>
|
||||
</#if>
|
||||
|
|
23
webapp/web/templates/freemarker/body/error/error-display.ftl
Normal file
23
webapp/web/templates/freemarker/body/error/error-display.ftl
Normal file
|
@ -0,0 +1,23 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for general system error. -->
|
||||
|
||||
<p>
|
||||
There was an error in the system.
|
||||
<#-- This error has been reported to the site administrator. -->
|
||||
</p>
|
||||
|
||||
<#if errorData??> <#-- view for site administrators -->
|
||||
<#if errorData.errorMessage?has_content>
|
||||
<p><strong>Error message:</strong> ${errorData.errorMessage}</p>
|
||||
</#if>
|
||||
<#if errorData.stackTrace?has_content>
|
||||
<div>
|
||||
<p><strong>Stack trace</strong> (full trace available in the vivo log):</p>
|
||||
${errorData.stackTrace}
|
||||
</div>
|
||||
</#if>
|
||||
<#elseif ! urls.currentPage?ends_with("home")> <#-- view for other users -->
|
||||
<p>Return to the <a href="${urls.home}">home page</a>.</p>
|
||||
</#if>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue