From d8427cfc89536f6f5c4372b3924933bcf7726220 Mon Sep 17 00:00:00 2001 From: Scott Murphy Heiberg Date: Tue, 1 Oct 2024 23:33:58 -0700 Subject: [PATCH] Pass tag attributes to stackTracePrinter --- .../org/grails/plugins/web/taglib/RenderTagLib.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grails-web-gsp-taglib/src/main/groovy/org/grails/plugins/web/taglib/RenderTagLib.groovy b/grails-web-gsp-taglib/src/main/groovy/org/grails/plugins/web/taglib/RenderTagLib.groovy index f7cc0613c3..83b0b193be 100644 --- a/grails-web-gsp-taglib/src/main/groovy/org/grails/plugins/web/taglib/RenderTagLib.groovy +++ b/grails-web-gsp-taglib/src/main/groovy/org/grails/plugins/web/taglib/RenderTagLib.groovy @@ -76,7 +76,7 @@ class RenderTagLib implements TagLibrary { def currentOut = out int statusCode = request.getAttribute('jakarta.servlet.error.status_code') as int currentOut << """

Error ${prettyPrintStatus(statusCode)}

-
+
URI
${htmlEncoder.encode(WebUtils.getForwardURI(request) ?: request.getAttribute('jakarta.servlet.error.request_uri'))}
""" @@ -88,12 +88,12 @@ class RenderTagLib implements TagLibrary { } currentOut << "
" - currentOut << errorsViewStackTracePrinter.prettyPrintCodeSnippet(exception) + currentOut << errorsViewStackTracePrinter.prettyPrintCodeSnippet(exception, attrs) - def trace = errorsViewStackTracePrinter.prettyPrint(exception.cause ?: exception) + def trace = errorsViewStackTracePrinter.prettyPrint(exception.cause ?: exception, attrs) if (StringUtils.hasText(trace.trim())) { currentOut << "

Trace

" - currentOut << '
'
+            currentOut << """
"""
             currentOut << htmlEncoder.encode(trace)
             currentOut << '
' }