ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-10817) Configure stackTrace displaying on ftl rendering
Date Sat, 06 Apr 2019 09:36:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-10817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16811523#comment-16811523
] 

Jacques Le Roux commented on OFBIZ-10817:
-----------------------------------------

Thanks Nicolas,

Your example works!

Actually you don't need a patch simply remove a # in (for instance) product Main.ftl. You
will see that in this case (same for main.ftl in ecommerce, etc. I guess) there is no stack
trace OOTB.

If you use the above widget .properties setting, to be clear I copy mine :):
{noformat}
Index: widget.properties
===================================================================
--- widget.properties	(revision 1857048)
+++ widget.properties	(working copy)
@@ -25,7 +25,7 @@
 # overridden in an application's web.xml file or in the screen rendering context.
 # A setting of false will override all other settings and disable all widget
 # boundary comments. 
-widget.verbose=true
+widget.verbose=false
 
 # Default number of items to be displayed per page in a list form
 widget.form.defaultViewSize=20
@@ -48,4 +48,4 @@
 
 # When you don't displaying freemarker stacktrace, you can replace it by an other message
 # by default it use ∎ but you can set what you want, like 'ERROR', '##' or ' '
-#widget.freemarker.template.exception.message=
+widget.freemarker.template.exception.message=ERROR ERROR ERROR

{noformat}
and get to product component you will see no "ERROR ERROR ERROR" but the same error than OOTB,
ie:
{noformat}
Catalog Administration Main Page
 Error rendering included template at location [component://product/template/Main.ftl]: freemarker.core.ParseException:
Syntax error in template "component://product/template/Main.ftl" in line 23, column 1: Unexpected
directive, "". Check if you have a valid #if-#elseif-#else structure.{noformat}

> Configure stackTrace displaying on ftl rendering
> ------------------------------------------------
>
>                 Key: OFBIZ-10817
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10817
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>         Attachments: Failure.png, FailureSafe.png, OFBIZ-10817.patch, OFBIZ-10817.patch,
OFBIZ-10817.patch, Sélection_236.png, Sélection_237.png
>
>
> Currently when freemarker failed to execute a template, you have on end screen rendered
all java stack trace generate.
> I propose to improve this to display the stack trace only when the property widget.verbose
is true, no regression during development and when you switch to production site, in general
your widget.verbose is false so end user haven't stack trace (that totally unused for them).
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message